} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); adc(cond, rd, rn, operand); } void Adc(Register rd, Register rn, const Operand& operand) { Adc(al, rd, rn, operand); } void Adc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Adc(cond, rd, rn, operand); break; case SetFlags: Adcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Adcs(cond, rd, rn, operand); } else { Adc(cond, rd, rn, operand); } break; } } void Adc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Adc(flags, al, rd, rn, operand); } void Adcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); adcs(cond, rd, rn, operand); } void Adcs(Register rd, Register rn, const Operand& operand) { Adcs(al, rd, rn, operand); } void Add(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // ADD{} , , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() && rd.IsLow()) || // ADD{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rd.IsLow() && rn.Is(rd)) || // ADD{}{} , SP, # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 1020) && ((operand.GetImmediate() & 0x3) == 0) && rd.IsLow() && rn.IsSP()) || // ADD{} , , (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && operand.GetBaseRegister().IsLow()) || // ADD{} , ; T2 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) && !operand.GetBaseRegister().IsSP() && !operand.GetBaseRegister().IsPC()) || // ADD{}{} {,} SP, ; T1 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() && operand.GetBaseRegister().Is(rd)); ITScope it_scope(this, &cond, can_use_it); add(cond, rd, rn, operand); } void Add(Register rd, Register rn, const Operand& operand) { Add(al, rd, rn, operand); } void Add(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Add(cond, rd, rn, operand); break; case SetFlags: Adds(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && !rd.Is(rn) && operand.GetBaseRegister().IsLow()) || (operand.IsImmediate() && ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) || (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256))))); if (setflags_is_smaller) { Adds(cond, rd, rn, operand); } else { bool changed_op_is_smaller = operand.IsImmediate() && (operand.GetSignedImmediate() < 0) && ((rd.IsLow() && rn.IsLow() && (operand.GetSignedImmediate() >= -7)) || (rd.IsLow() && rn.Is(rd) && (operand.GetSignedImmediate() >= -255))); if (changed_op_is_smaller) { Subs(cond, rd, rn, -operand.GetSignedImmediate()); } else { Add(cond, rd, rn, operand); } } break; } } void Add(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Add(flags, al, rd, rn, operand); } void Adds(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); adds(cond, rd, rn, operand); } void Adds(Register rd, Register rn, const Operand& operand) { Adds(al, rd, rn, operand); } void And(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mov(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } bool can_use_it = // AND{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); and_(cond, rd, rn, operand); } void And(Register rd, Register rn, const Operand& operand) { And(al, rd, rn, operand); } void And(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: And(cond, rd, rn, operand); break; case SetFlags: Ands(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Ands(cond, rd, rn, operand); } else { And(cond, rd, rn, operand); } break; } } void And(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { And(flags, al, rd, rn, operand); } void Ands(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ands(cond, rd, rn, operand); } void Ands(Register rd, Register rn, const Operand& operand) { Ands(al, rd, rn, operand); } void Asr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ASR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // ASR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); asr(cond, rd, rm, operand); } void Asr(Register rd, Register rm, const Operand& operand) { Asr(al, rd, rm, operand); } void Asr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Asr(cond, rd, rm, operand); break; case SetFlags: Asrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Asrs(cond, rd, rm, operand); } else { Asr(cond, rd, rm, operand); } break; } } void Asr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Asr(flags, al, rd, rm, operand); } void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); asrs(cond, rd, rm, operand); } void Asrs(Register rd, Register rm, const Operand& operand) { Asrs(al, rd, rm, operand); } void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (hint == kNear) { if (label->IsBound()) { b(cond, label); } else { b(cond, Narrow, label); } } else { b(cond, label); } AddBranchLabel(label); } void B(Label* label, BranchHint hint = kBranchWithoutHint) { B(al, label, hint); } void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); } void BPreferNear(Label* label) { B(al, label, kNear); } void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfc(cond, rd, lsb, operand); } void Bfc(Register rd, uint32_t lsb, const Operand& operand) { Bfc(al, rd, lsb, operand); } void Bfi(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfi(cond, rd, rn, lsb, operand); } void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Bfi(al, rd, rn, lsb, operand); } void Bic(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mov(rd, 0); return; } } bool can_use_it = // BIC{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); bic(cond, rd, rn, operand); } void Bic(Register rd, Register rn, const Operand& operand) { Bic(al, rd, rn, operand); } void Bic(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Bic(cond, rd, rn, operand); break; case SetFlags: Bics(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Bics(cond, rd, rn, operand); } else { Bic(cond, rd, rn, operand); } break; } } void Bic(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Bic(flags, al, rd, rn, operand); } void Bics(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bics(cond, rd, rn, operand); } void Bics(Register rd, Register rn, const Operand& operand) { Bics(al, rd, rn, operand); } void Bkpt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bkpt(cond, imm); } void Bkpt(uint32_t imm) { Bkpt(al, imm); } void Bl(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bl(cond, label); AddBranchLabel(label); } void Bl(Label* label) { Bl(al, label); } void Blx(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); blx(cond, label); AddBranchLabel(label); } void Blx(Label* label) { Blx(al, label); } void Blx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BLX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); blx(cond, rm); } void Blx(Register rm) { Blx(al, rm); } void Bx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); bx(cond, rm); } void Bx(Register rm) { Bx(al, rm); } void Bxj(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bxj(cond, rm); } void Bxj(Register rm) { Bxj(al, rm); } void Cbnz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbnz(rn, label); AddBranchLabel(label); } void Cbz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbz(rn, label); AddBranchLabel(label); } void Clrex(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clrex(cond); } void Clrex() { Clrex(al); } void Clz(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clz(cond, rd, rm); } void Clz(Register rd, Register rm) { Clz(al, rd, rm); } void Cmn(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMN{}{} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 7) && rn.IsLow() && rd.IsLow()) || // ADD{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rd.IsLow() && rn.Is(rd)) || // ADD{}{} , SP, # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 1020) && ((operand.GetImmediate() & 0x3) == 0) && rd.IsLow() && rn.IsSP()) || // ADD{} , , (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && operand.GetBaseRegister().IsLow()) || // ADD{} , ; T2 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) && !operand.GetBaseRegister().IsSP() && !operand.GetBaseRegister().IsPC()) || // ADD{}{} {,} SP, ; T1 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() && operand.GetBaseRegister().Is(rd)); ITScope it_scope(this, &cond, can_use_it); add(cond, rd, rn, operand); } void Add(Register rd, Register rn, const Operand& operand) { Add(al, rd, rn, operand); } void Add(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Add(cond, rd, rn, operand); break; case SetFlags: Adds(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && !rd.Is(rn) && operand.GetBaseRegister().IsLow()) || (operand.IsImmediate() && ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) || (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256))))); if (setflags_is_smaller) { Adds(cond, rd, rn, operand); } else { bool changed_op_is_smaller = operand.IsImmediate() && (operand.GetSignedImmediate() < 0) && ((rd.IsLow() && rn.IsLow() && (operand.GetSignedImmediate() >= -7)) || (rd.IsLow() && rn.Is(rd) && (operand.GetSignedImmediate() >= -255))); if (changed_op_is_smaller) { Subs(cond, rd, rn, -operand.GetSignedImmediate()); } else { Add(cond, rd, rn, operand); } } break; } } void Add(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Add(flags, al, rd, rn, operand); } void Adds(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); adds(cond, rd, rn, operand); } void Adds(Register rd, Register rn, const Operand& operand) { Adds(al, rd, rn, operand); } void And(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mov(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } bool can_use_it = // AND{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); and_(cond, rd, rn, operand); } void And(Register rd, Register rn, const Operand& operand) { And(al, rd, rn, operand); } void And(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: And(cond, rd, rn, operand); break; case SetFlags: Ands(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Ands(cond, rd, rn, operand); } else { And(cond, rd, rn, operand); } break; } } void And(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { And(flags, al, rd, rn, operand); } void Ands(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ands(cond, rd, rn, operand); } void Ands(Register rd, Register rn, const Operand& operand) { Ands(al, rd, rn, operand); } void Asr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ASR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // ASR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); asr(cond, rd, rm, operand); } void Asr(Register rd, Register rm, const Operand& operand) { Asr(al, rd, rm, operand); } void Asr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Asr(cond, rd, rm, operand); break; case SetFlags: Asrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Asrs(cond, rd, rm, operand); } else { Asr(cond, rd, rm, operand); } break; } } void Asr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Asr(flags, al, rd, rm, operand); } void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); asrs(cond, rd, rm, operand); } void Asrs(Register rd, Register rm, const Operand& operand) { Asrs(al, rd, rm, operand); } void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (hint == kNear) { if (label->IsBound()) { b(cond, label); } else { b(cond, Narrow, label); } } else { b(cond, label); } AddBranchLabel(label); } void B(Label* label, BranchHint hint = kBranchWithoutHint) { B(al, label, hint); } void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); } void BPreferNear(Label* label) { B(al, label, kNear); } void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfc(cond, rd, lsb, operand); } void Bfc(Register rd, uint32_t lsb, const Operand& operand) { Bfc(al, rd, lsb, operand); } void Bfi(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfi(cond, rd, rn, lsb, operand); } void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Bfi(al, rd, rn, lsb, operand); } void Bic(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mov(rd, 0); return; } } bool can_use_it = // BIC{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); bic(cond, rd, rn, operand); } void Bic(Register rd, Register rn, const Operand& operand) { Bic(al, rd, rn, operand); } void Bic(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Bic(cond, rd, rn, operand); break; case SetFlags: Bics(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Bics(cond, rd, rn, operand); } else { Bic(cond, rd, rn, operand); } break; } } void Bic(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Bic(flags, al, rd, rn, operand); } void Bics(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bics(cond, rd, rn, operand); } void Bics(Register rd, Register rn, const Operand& operand) { Bics(al, rd, rn, operand); } void Bkpt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bkpt(cond, imm); } void Bkpt(uint32_t imm) { Bkpt(al, imm); } void Bl(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bl(cond, label); AddBranchLabel(label); } void Bl(Label* label) { Bl(al, label); } void Blx(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); blx(cond, label); AddBranchLabel(label); } void Blx(Label* label) { Blx(al, label); } void Blx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BLX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); blx(cond, rm); } void Blx(Register rm) { Blx(al, rm); } void Bx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); bx(cond, rm); } void Bx(Register rm) { Bx(al, rm); } void Bxj(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bxj(cond, rm); } void Bxj(Register rm) { Bxj(al, rm); } void Cbnz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbnz(rn, label); AddBranchLabel(label); } void Cbz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbz(rn, label); AddBranchLabel(label); } void Clrex(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clrex(cond); } void Clrex() { Clrex(al); } void Clz(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clz(cond, rd, rm); } void Clz(Register rd, Register rm) { Clz(al, rd, rm); } void Cmn(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMN{}{} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rd.IsLow() && rn.Is(rd)) || // ADD{}{} , SP, # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 1020) && ((operand.GetImmediate() & 0x3) == 0) && rd.IsLow() && rn.IsSP()) || // ADD{} , , (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && operand.GetBaseRegister().IsLow()) || // ADD{} , ; T2 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) && !operand.GetBaseRegister().IsSP() && !operand.GetBaseRegister().IsPC()) || // ADD{}{} {,} SP, ; T1 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() && operand.GetBaseRegister().Is(rd)); ITScope it_scope(this, &cond, can_use_it); add(cond, rd, rn, operand); } void Add(Register rd, Register rn, const Operand& operand) { Add(al, rd, rn, operand); } void Add(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Add(cond, rd, rn, operand); break; case SetFlags: Adds(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && !rd.Is(rn) && operand.GetBaseRegister().IsLow()) || (operand.IsImmediate() && ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) || (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256))))); if (setflags_is_smaller) { Adds(cond, rd, rn, operand); } else { bool changed_op_is_smaller = operand.IsImmediate() && (operand.GetSignedImmediate() < 0) && ((rd.IsLow() && rn.IsLow() && (operand.GetSignedImmediate() >= -7)) || (rd.IsLow() && rn.Is(rd) && (operand.GetSignedImmediate() >= -255))); if (changed_op_is_smaller) { Subs(cond, rd, rn, -operand.GetSignedImmediate()); } else { Add(cond, rd, rn, operand); } } break; } } void Add(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Add(flags, al, rd, rn, operand); } void Adds(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); adds(cond, rd, rn, operand); } void Adds(Register rd, Register rn, const Operand& operand) { Adds(al, rd, rn, operand); } void And(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mov(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } bool can_use_it = // AND{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); and_(cond, rd, rn, operand); } void And(Register rd, Register rn, const Operand& operand) { And(al, rd, rn, operand); } void And(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: And(cond, rd, rn, operand); break; case SetFlags: Ands(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Ands(cond, rd, rn, operand); } else { And(cond, rd, rn, operand); } break; } } void And(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { And(flags, al, rd, rn, operand); } void Ands(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ands(cond, rd, rn, operand); } void Ands(Register rd, Register rn, const Operand& operand) { Ands(al, rd, rn, operand); } void Asr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ASR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // ASR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); asr(cond, rd, rm, operand); } void Asr(Register rd, Register rm, const Operand& operand) { Asr(al, rd, rm, operand); } void Asr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Asr(cond, rd, rm, operand); break; case SetFlags: Asrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Asrs(cond, rd, rm, operand); } else { Asr(cond, rd, rm, operand); } break; } } void Asr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Asr(flags, al, rd, rm, operand); } void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); asrs(cond, rd, rm, operand); } void Asrs(Register rd, Register rm, const Operand& operand) { Asrs(al, rd, rm, operand); } void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (hint == kNear) { if (label->IsBound()) { b(cond, label); } else { b(cond, Narrow, label); } } else { b(cond, label); } AddBranchLabel(label); } void B(Label* label, BranchHint hint = kBranchWithoutHint) { B(al, label, hint); } void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); } void BPreferNear(Label* label) { B(al, label, kNear); } void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfc(cond, rd, lsb, operand); } void Bfc(Register rd, uint32_t lsb, const Operand& operand) { Bfc(al, rd, lsb, operand); } void Bfi(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfi(cond, rd, rn, lsb, operand); } void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Bfi(al, rd, rn, lsb, operand); } void Bic(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mov(rd, 0); return; } } bool can_use_it = // BIC{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); bic(cond, rd, rn, operand); } void Bic(Register rd, Register rn, const Operand& operand) { Bic(al, rd, rn, operand); } void Bic(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Bic(cond, rd, rn, operand); break; case SetFlags: Bics(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Bics(cond, rd, rn, operand); } else { Bic(cond, rd, rn, operand); } break; } } void Bic(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Bic(flags, al, rd, rn, operand); } void Bics(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bics(cond, rd, rn, operand); } void Bics(Register rd, Register rn, const Operand& operand) { Bics(al, rd, rn, operand); } void Bkpt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bkpt(cond, imm); } void Bkpt(uint32_t imm) { Bkpt(al, imm); } void Bl(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bl(cond, label); AddBranchLabel(label); } void Bl(Label* label) { Bl(al, label); } void Blx(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); blx(cond, label); AddBranchLabel(label); } void Blx(Label* label) { Blx(al, label); } void Blx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BLX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); blx(cond, rm); } void Blx(Register rm) { Blx(al, rm); } void Bx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); bx(cond, rm); } void Bx(Register rm) { Bx(al, rm); } void Bxj(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bxj(cond, rm); } void Bxj(Register rm) { Bxj(al, rm); } void Cbnz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbnz(rn, label); AddBranchLabel(label); } void Cbz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbz(rn, label); AddBranchLabel(label); } void Clrex(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clrex(cond); } void Clrex() { Clrex(al); } void Clz(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clz(cond, rd, rm); } void Clz(Register rd, Register rm) { Clz(al, rd, rm); } void Cmn(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMN{}{} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , SP, # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 1020) && ((operand.GetImmediate() & 0x3) == 0) && rd.IsLow() && rn.IsSP()) || // ADD{} , , (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && operand.GetBaseRegister().IsLow()) || // ADD{} , ; T2 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) && !operand.GetBaseRegister().IsSP() && !operand.GetBaseRegister().IsPC()) || // ADD{}{} {,} SP, ; T1 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() && operand.GetBaseRegister().Is(rd)); ITScope it_scope(this, &cond, can_use_it); add(cond, rd, rn, operand); } void Add(Register rd, Register rn, const Operand& operand) { Add(al, rd, rn, operand); } void Add(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Add(cond, rd, rn, operand); break; case SetFlags: Adds(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && !rd.Is(rn) && operand.GetBaseRegister().IsLow()) || (operand.IsImmediate() && ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) || (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256))))); if (setflags_is_smaller) { Adds(cond, rd, rn, operand); } else { bool changed_op_is_smaller = operand.IsImmediate() && (operand.GetSignedImmediate() < 0) && ((rd.IsLow() && rn.IsLow() && (operand.GetSignedImmediate() >= -7)) || (rd.IsLow() && rn.Is(rd) && (operand.GetSignedImmediate() >= -255))); if (changed_op_is_smaller) { Subs(cond, rd, rn, -operand.GetSignedImmediate()); } else { Add(cond, rd, rn, operand); } } break; } } void Add(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Add(flags, al, rd, rn, operand); } void Adds(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); adds(cond, rd, rn, operand); } void Adds(Register rd, Register rn, const Operand& operand) { Adds(al, rd, rn, operand); } void And(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mov(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } bool can_use_it = // AND{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); and_(cond, rd, rn, operand); } void And(Register rd, Register rn, const Operand& operand) { And(al, rd, rn, operand); } void And(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: And(cond, rd, rn, operand); break; case SetFlags: Ands(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Ands(cond, rd, rn, operand); } else { And(cond, rd, rn, operand); } break; } } void And(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { And(flags, al, rd, rn, operand); } void Ands(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ands(cond, rd, rn, operand); } void Ands(Register rd, Register rn, const Operand& operand) { Ands(al, rd, rn, operand); } void Asr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ASR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // ASR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); asr(cond, rd, rm, operand); } void Asr(Register rd, Register rm, const Operand& operand) { Asr(al, rd, rm, operand); } void Asr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Asr(cond, rd, rm, operand); break; case SetFlags: Asrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Asrs(cond, rd, rm, operand); } else { Asr(cond, rd, rm, operand); } break; } } void Asr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Asr(flags, al, rd, rm, operand); } void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); asrs(cond, rd, rm, operand); } void Asrs(Register rd, Register rm, const Operand& operand) { Asrs(al, rd, rm, operand); } void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (hint == kNear) { if (label->IsBound()) { b(cond, label); } else { b(cond, Narrow, label); } } else { b(cond, label); } AddBranchLabel(label); } void B(Label* label, BranchHint hint = kBranchWithoutHint) { B(al, label, hint); } void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); } void BPreferNear(Label* label) { B(al, label, kNear); } void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfc(cond, rd, lsb, operand); } void Bfc(Register rd, uint32_t lsb, const Operand& operand) { Bfc(al, rd, lsb, operand); } void Bfi(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfi(cond, rd, rn, lsb, operand); } void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Bfi(al, rd, rn, lsb, operand); } void Bic(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mov(rd, 0); return; } } bool can_use_it = // BIC{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); bic(cond, rd, rn, operand); } void Bic(Register rd, Register rn, const Operand& operand) { Bic(al, rd, rn, operand); } void Bic(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Bic(cond, rd, rn, operand); break; case SetFlags: Bics(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Bics(cond, rd, rn, operand); } else { Bic(cond, rd, rn, operand); } break; } } void Bic(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Bic(flags, al, rd, rn, operand); } void Bics(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bics(cond, rd, rn, operand); } void Bics(Register rd, Register rn, const Operand& operand) { Bics(al, rd, rn, operand); } void Bkpt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bkpt(cond, imm); } void Bkpt(uint32_t imm) { Bkpt(al, imm); } void Bl(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bl(cond, label); AddBranchLabel(label); } void Bl(Label* label) { Bl(al, label); } void Blx(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); blx(cond, label); AddBranchLabel(label); } void Blx(Label* label) { Blx(al, label); } void Blx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BLX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); blx(cond, rm); } void Blx(Register rm) { Blx(al, rm); } void Bx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); bx(cond, rm); } void Bx(Register rm) { Bx(al, rm); } void Bxj(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bxj(cond, rm); } void Bxj(Register rm) { Bxj(al, rm); } void Cbnz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbnz(rn, label); AddBranchLabel(label); } void Cbz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbz(rn, label); AddBranchLabel(label); } void Clrex(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clrex(cond); } void Clrex() { Clrex(al); } void Clz(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clz(cond, rd, rm); } void Clz(Register rd, Register rm) { Clz(al, rd, rm); } void Cmn(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMN{}{} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , , (operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && operand.GetBaseRegister().IsLow()) || // ADD{} , ; T2 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) && !operand.GetBaseRegister().IsSP() && !operand.GetBaseRegister().IsPC()) || // ADD{}{} {,} SP, ; T1 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() && operand.GetBaseRegister().Is(rd)); ITScope it_scope(this, &cond, can_use_it); add(cond, rd, rn, operand); } void Add(Register rd, Register rn, const Operand& operand) { Add(al, rd, rn, operand); } void Add(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Add(cond, rd, rn, operand); break; case SetFlags: Adds(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && !rd.Is(rn) && operand.GetBaseRegister().IsLow()) || (operand.IsImmediate() && ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) || (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256))))); if (setflags_is_smaller) { Adds(cond, rd, rn, operand); } else { bool changed_op_is_smaller = operand.IsImmediate() && (operand.GetSignedImmediate() < 0) && ((rd.IsLow() && rn.IsLow() && (operand.GetSignedImmediate() >= -7)) || (rd.IsLow() && rn.Is(rd) && (operand.GetSignedImmediate() >= -255))); if (changed_op_is_smaller) { Subs(cond, rd, rn, -operand.GetSignedImmediate()); } else { Add(cond, rd, rn, operand); } } break; } } void Add(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Add(flags, al, rd, rn, operand); } void Adds(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); adds(cond, rd, rn, operand); } void Adds(Register rd, Register rn, const Operand& operand) { Adds(al, rd, rn, operand); } void And(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mov(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } bool can_use_it = // AND{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); and_(cond, rd, rn, operand); } void And(Register rd, Register rn, const Operand& operand) { And(al, rd, rn, operand); } void And(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: And(cond, rd, rn, operand); break; case SetFlags: Ands(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Ands(cond, rd, rn, operand); } else { And(cond, rd, rn, operand); } break; } } void And(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { And(flags, al, rd, rn, operand); } void Ands(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ands(cond, rd, rn, operand); } void Ands(Register rd, Register rn, const Operand& operand) { Ands(al, rd, rn, operand); } void Asr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ASR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // ASR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); asr(cond, rd, rm, operand); } void Asr(Register rd, Register rm, const Operand& operand) { Asr(al, rd, rm, operand); } void Asr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Asr(cond, rd, rm, operand); break; case SetFlags: Asrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Asrs(cond, rd, rm, operand); } else { Asr(cond, rd, rm, operand); } break; } } void Asr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Asr(flags, al, rd, rm, operand); } void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); asrs(cond, rd, rm, operand); } void Asrs(Register rd, Register rm, const Operand& operand) { Asrs(al, rd, rm, operand); } void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (hint == kNear) { if (label->IsBound()) { b(cond, label); } else { b(cond, Narrow, label); } } else { b(cond, label); } AddBranchLabel(label); } void B(Label* label, BranchHint hint = kBranchWithoutHint) { B(al, label, hint); } void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); } void BPreferNear(Label* label) { B(al, label, kNear); } void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfc(cond, rd, lsb, operand); } void Bfc(Register rd, uint32_t lsb, const Operand& operand) { Bfc(al, rd, lsb, operand); } void Bfi(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfi(cond, rd, rn, lsb, operand); } void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Bfi(al, rd, rn, lsb, operand); } void Bic(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mov(rd, 0); return; } } bool can_use_it = // BIC{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); bic(cond, rd, rn, operand); } void Bic(Register rd, Register rn, const Operand& operand) { Bic(al, rd, rn, operand); } void Bic(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Bic(cond, rd, rn, operand); break; case SetFlags: Bics(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Bics(cond, rd, rn, operand); } else { Bic(cond, rd, rn, operand); } break; } } void Bic(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Bic(flags, al, rd, rn, operand); } void Bics(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bics(cond, rd, rn, operand); } void Bics(Register rd, Register rn, const Operand& operand) { Bics(al, rd, rn, operand); } void Bkpt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bkpt(cond, imm); } void Bkpt(uint32_t imm) { Bkpt(al, imm); } void Bl(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bl(cond, label); AddBranchLabel(label); } void Bl(Label* label) { Bl(al, label); } void Blx(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); blx(cond, label); AddBranchLabel(label); } void Blx(Label* label) { Blx(al, label); } void Blx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BLX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); blx(cond, rm); } void Blx(Register rm) { Blx(al, rm); } void Bx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); bx(cond, rm); } void Bx(Register rm) { Bx(al, rm); } void Bxj(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bxj(cond, rm); } void Bxj(Register rm) { Bxj(al, rm); } void Cbnz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbnz(rn, label); AddBranchLabel(label); } void Cbz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbz(rn, label); AddBranchLabel(label); } void Clrex(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clrex(cond); } void Clrex() { Clrex(al); } void Clz(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clz(cond, rd, rm); } void Clz(Register rd, Register rm) { Clz(al, rd, rm); } void Cmn(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMN{}{} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , ; T2 (operand.IsPlainRegister() && !rd.IsPC() && rn.Is(rd) && !operand.GetBaseRegister().IsSP() && !operand.GetBaseRegister().IsPC()) || // ADD{}{} {,} SP, ; T1 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() && operand.GetBaseRegister().Is(rd)); ITScope it_scope(this, &cond, can_use_it); add(cond, rd, rn, operand); } void Add(Register rd, Register rn, const Operand& operand) { Add(al, rd, rn, operand); } void Add(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Add(cond, rd, rn, operand); break; case SetFlags: Adds(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && !rd.Is(rn) && operand.GetBaseRegister().IsLow()) || (operand.IsImmediate() && ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) || (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256))))); if (setflags_is_smaller) { Adds(cond, rd, rn, operand); } else { bool changed_op_is_smaller = operand.IsImmediate() && (operand.GetSignedImmediate() < 0) && ((rd.IsLow() && rn.IsLow() && (operand.GetSignedImmediate() >= -7)) || (rd.IsLow() && rn.Is(rd) && (operand.GetSignedImmediate() >= -255))); if (changed_op_is_smaller) { Subs(cond, rd, rn, -operand.GetSignedImmediate()); } else { Add(cond, rd, rn, operand); } } break; } } void Add(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Add(flags, al, rd, rn, operand); } void Adds(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); adds(cond, rd, rn, operand); } void Adds(Register rd, Register rn, const Operand& operand) { Adds(al, rd, rn, operand); } void And(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mov(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } bool can_use_it = // AND{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); and_(cond, rd, rn, operand); } void And(Register rd, Register rn, const Operand& operand) { And(al, rd, rn, operand); } void And(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: And(cond, rd, rn, operand); break; case SetFlags: Ands(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Ands(cond, rd, rn, operand); } else { And(cond, rd, rn, operand); } break; } } void And(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { And(flags, al, rd, rn, operand); } void Ands(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ands(cond, rd, rn, operand); } void Ands(Register rd, Register rn, const Operand& operand) { Ands(al, rd, rn, operand); } void Asr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ASR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // ASR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); asr(cond, rd, rm, operand); } void Asr(Register rd, Register rm, const Operand& operand) { Asr(al, rd, rm, operand); } void Asr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Asr(cond, rd, rm, operand); break; case SetFlags: Asrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Asrs(cond, rd, rm, operand); } else { Asr(cond, rd, rm, operand); } break; } } void Asr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Asr(flags, al, rd, rm, operand); } void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); asrs(cond, rd, rm, operand); } void Asrs(Register rd, Register rm, const Operand& operand) { Asrs(al, rd, rm, operand); } void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (hint == kNear) { if (label->IsBound()) { b(cond, label); } else { b(cond, Narrow, label); } } else { b(cond, label); } AddBranchLabel(label); } void B(Label* label, BranchHint hint = kBranchWithoutHint) { B(al, label, hint); } void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); } void BPreferNear(Label* label) { B(al, label, kNear); } void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfc(cond, rd, lsb, operand); } void Bfc(Register rd, uint32_t lsb, const Operand& operand) { Bfc(al, rd, lsb, operand); } void Bfi(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfi(cond, rd, rn, lsb, operand); } void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Bfi(al, rd, rn, lsb, operand); } void Bic(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mov(rd, 0); return; } } bool can_use_it = // BIC{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); bic(cond, rd, rn, operand); } void Bic(Register rd, Register rn, const Operand& operand) { Bic(al, rd, rn, operand); } void Bic(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Bic(cond, rd, rn, operand); break; case SetFlags: Bics(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Bics(cond, rd, rn, operand); } else { Bic(cond, rd, rn, operand); } break; } } void Bic(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Bic(flags, al, rd, rn, operand); } void Bics(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bics(cond, rd, rn, operand); } void Bics(Register rd, Register rn, const Operand& operand) { Bics(al, rd, rn, operand); } void Bkpt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bkpt(cond, imm); } void Bkpt(uint32_t imm) { Bkpt(al, imm); } void Bl(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bl(cond, label); AddBranchLabel(label); } void Bl(Label* label) { Bl(al, label); } void Blx(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); blx(cond, label); AddBranchLabel(label); } void Blx(Label* label) { Blx(al, label); } void Blx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BLX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); blx(cond, rm); } void Blx(Register rm) { Blx(al, rm); } void Bx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); bx(cond, rm); } void Bx(Register rm) { Bx(al, rm); } void Bxj(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bxj(cond, rm); } void Bxj(Register rm) { Bxj(al, rm); } void Cbnz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbnz(rn, label); AddBranchLabel(label); } void Cbz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbz(rn, label); AddBranchLabel(label); } void Clrex(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clrex(cond); } void Clrex() { Clrex(al); } void Clz(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clz(cond, rd, rm); } void Clz(Register rd, Register rm) { Clz(al, rd, rm); } void Cmn(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMN{}{} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} SP, ; T1 (operand.IsPlainRegister() && !rd.IsPC() && rn.IsSP() && operand.GetBaseRegister().Is(rd)); ITScope it_scope(this, &cond, can_use_it); add(cond, rd, rn, operand); } void Add(Register rd, Register rn, const Operand& operand) { Add(al, rd, rn, operand); } void Add(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Add(cond, rd, rn, operand); break; case SetFlags: Adds(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsPlainRegister() && rd.IsLow() && rn.IsLow() && !rd.Is(rn) && operand.GetBaseRegister().IsLow()) || (operand.IsImmediate() && ((rd.IsLow() && rn.IsLow() && (operand.GetImmediate() < 8)) || (rd.IsLow() && rn.Is(rd) && (operand.GetImmediate() < 256))))); if (setflags_is_smaller) { Adds(cond, rd, rn, operand); } else { bool changed_op_is_smaller = operand.IsImmediate() && (operand.GetSignedImmediate() < 0) && ((rd.IsLow() && rn.IsLow() && (operand.GetSignedImmediate() >= -7)) || (rd.IsLow() && rn.Is(rd) && (operand.GetSignedImmediate() >= -255))); if (changed_op_is_smaller) { Subs(cond, rd, rn, -operand.GetSignedImmediate()); } else { Add(cond, rd, rn, operand); } } break; } } void Add(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Add(flags, al, rd, rn, operand); } void Adds(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); adds(cond, rd, rn, operand); } void Adds(Register rd, Register rn, const Operand& operand) { Adds(al, rd, rn, operand); } void And(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mov(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } bool can_use_it = // AND{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); and_(cond, rd, rn, operand); } void And(Register rd, Register rn, const Operand& operand) { And(al, rd, rn, operand); } void And(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: And(cond, rd, rn, operand); break; case SetFlags: Ands(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Ands(cond, rd, rn, operand); } else { And(cond, rd, rn, operand); } break; } } void And(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { And(flags, al, rd, rn, operand); } void Ands(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ands(cond, rd, rn, operand); } void Ands(Register rd, Register rn, const Operand& operand) { Ands(al, rd, rn, operand); } void Asr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ASR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // ASR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); asr(cond, rd, rm, operand); } void Asr(Register rd, Register rm, const Operand& operand) { Asr(al, rd, rm, operand); } void Asr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Asr(cond, rd, rm, operand); break; case SetFlags: Asrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Asrs(cond, rd, rm, operand); } else { Asr(cond, rd, rm, operand); } break; } } void Asr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Asr(flags, al, rd, rm, operand); } void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); asrs(cond, rd, rm, operand); } void Asrs(Register rd, Register rm, const Operand& operand) { Asrs(al, rd, rm, operand); } void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (hint == kNear) { if (label->IsBound()) { b(cond, label); } else { b(cond, Narrow, label); } } else { b(cond, label); } AddBranchLabel(label); } void B(Label* label, BranchHint hint = kBranchWithoutHint) { B(al, label, hint); } void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); } void BPreferNear(Label* label) { B(al, label, kNear); } void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfc(cond, rd, lsb, operand); } void Bfc(Register rd, uint32_t lsb, const Operand& operand) { Bfc(al, rd, lsb, operand); } void Bfi(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfi(cond, rd, rn, lsb, operand); } void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Bfi(al, rd, rn, lsb, operand); } void Bic(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mov(rd, 0); return; } } bool can_use_it = // BIC{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); bic(cond, rd, rn, operand); } void Bic(Register rd, Register rn, const Operand& operand) { Bic(al, rd, rn, operand); } void Bic(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Bic(cond, rd, rn, operand); break; case SetFlags: Bics(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Bics(cond, rd, rn, operand); } else { Bic(cond, rd, rn, operand); } break; } } void Bic(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Bic(flags, al, rd, rn, operand); } void Bics(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bics(cond, rd, rn, operand); } void Bics(Register rd, Register rn, const Operand& operand) { Bics(al, rd, rn, operand); } void Bkpt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bkpt(cond, imm); } void Bkpt(uint32_t imm) { Bkpt(al, imm); } void Bl(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bl(cond, label); AddBranchLabel(label); } void Bl(Label* label) { Bl(al, label); } void Blx(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); blx(cond, label); AddBranchLabel(label); } void Blx(Label* label) { Blx(al, label); } void Blx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BLX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); blx(cond, rm); } void Blx(Register rm) { Blx(al, rm); } void Bx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); bx(cond, rm); } void Bx(Register rm) { Bx(al, rm); } void Bxj(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bxj(cond, rm); } void Bxj(Register rm) { Bxj(al, rm); } void Cbnz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbnz(rn, label); AddBranchLabel(label); } void Cbz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbz(rn, label); AddBranchLabel(label); } void Clrex(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clrex(cond); } void Clrex() { Clrex(al); } void Clz(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clz(cond, rd, rm); } void Clz(Register rd, Register rm) { Clz(al, rd, rm); } void Cmn(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMN{}{} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); and_(cond, rd, rn, operand); } void And(Register rd, Register rn, const Operand& operand) { And(al, rd, rn, operand); } void And(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: And(cond, rd, rn, operand); break; case SetFlags: Ands(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Ands(cond, rd, rn, operand); } else { And(cond, rd, rn, operand); } break; } } void And(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { And(flags, al, rd, rn, operand); } void Ands(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ands(cond, rd, rn, operand); } void Ands(Register rd, Register rn, const Operand& operand) { Ands(al, rd, rn, operand); } void Asr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ASR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // ASR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); asr(cond, rd, rm, operand); } void Asr(Register rd, Register rm, const Operand& operand) { Asr(al, rd, rm, operand); } void Asr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Asr(cond, rd, rm, operand); break; case SetFlags: Asrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Asrs(cond, rd, rm, operand); } else { Asr(cond, rd, rm, operand); } break; } } void Asr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Asr(flags, al, rd, rm, operand); } void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); asrs(cond, rd, rm, operand); } void Asrs(Register rd, Register rm, const Operand& operand) { Asrs(al, rd, rm, operand); } void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (hint == kNear) { if (label->IsBound()) { b(cond, label); } else { b(cond, Narrow, label); } } else { b(cond, label); } AddBranchLabel(label); } void B(Label* label, BranchHint hint = kBranchWithoutHint) { B(al, label, hint); } void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); } void BPreferNear(Label* label) { B(al, label, kNear); } void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfc(cond, rd, lsb, operand); } void Bfc(Register rd, uint32_t lsb, const Operand& operand) { Bfc(al, rd, lsb, operand); } void Bfi(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfi(cond, rd, rn, lsb, operand); } void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Bfi(al, rd, rn, lsb, operand); } void Bic(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mov(rd, 0); return; } } bool can_use_it = // BIC{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); bic(cond, rd, rn, operand); } void Bic(Register rd, Register rn, const Operand& operand) { Bic(al, rd, rn, operand); } void Bic(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Bic(cond, rd, rn, operand); break; case SetFlags: Bics(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Bics(cond, rd, rn, operand); } else { Bic(cond, rd, rn, operand); } break; } } void Bic(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Bic(flags, al, rd, rn, operand); } void Bics(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bics(cond, rd, rn, operand); } void Bics(Register rd, Register rn, const Operand& operand) { Bics(al, rd, rn, operand); } void Bkpt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bkpt(cond, imm); } void Bkpt(uint32_t imm) { Bkpt(al, imm); } void Bl(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bl(cond, label); AddBranchLabel(label); } void Bl(Label* label) { Bl(al, label); } void Blx(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); blx(cond, label); AddBranchLabel(label); } void Blx(Label* label) { Blx(al, label); } void Blx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BLX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); blx(cond, rm); } void Blx(Register rm) { Blx(al, rm); } void Bx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); bx(cond, rm); } void Bx(Register rm) { Bx(al, rm); } void Bxj(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bxj(cond, rm); } void Bxj(Register rm) { Bxj(al, rm); } void Cbnz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbnz(rn, label); AddBranchLabel(label); } void Cbz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbz(rn, label); AddBranchLabel(label); } void Clrex(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clrex(cond); } void Clrex() { Clrex(al); } void Clz(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clz(cond, rd, rm); } void Clz(Register rd, Register rm) { Clz(al, rd, rm); } void Cmn(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMN{}{} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // ASR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); asr(cond, rd, rm, operand); } void Asr(Register rd, Register rm, const Operand& operand) { Asr(al, rd, rm, operand); } void Asr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Asr(cond, rd, rm, operand); break; case SetFlags: Asrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Asrs(cond, rd, rm, operand); } else { Asr(cond, rd, rm, operand); } break; } } void Asr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Asr(flags, al, rd, rm, operand); } void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); asrs(cond, rd, rm, operand); } void Asrs(Register rd, Register rm, const Operand& operand) { Asrs(al, rd, rm, operand); } void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (hint == kNear) { if (label->IsBound()) { b(cond, label); } else { b(cond, Narrow, label); } } else { b(cond, label); } AddBranchLabel(label); } void B(Label* label, BranchHint hint = kBranchWithoutHint) { B(al, label, hint); } void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); } void BPreferNear(Label* label) { B(al, label, kNear); } void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfc(cond, rd, lsb, operand); } void Bfc(Register rd, uint32_t lsb, const Operand& operand) { Bfc(al, rd, lsb, operand); } void Bfi(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfi(cond, rd, rn, lsb, operand); } void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Bfi(al, rd, rn, lsb, operand); } void Bic(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mov(rd, 0); return; } } bool can_use_it = // BIC{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); bic(cond, rd, rn, operand); } void Bic(Register rd, Register rn, const Operand& operand) { Bic(al, rd, rn, operand); } void Bic(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Bic(cond, rd, rn, operand); break; case SetFlags: Bics(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Bics(cond, rd, rn, operand); } else { Bic(cond, rd, rn, operand); } break; } } void Bic(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Bic(flags, al, rd, rn, operand); } void Bics(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bics(cond, rd, rn, operand); } void Bics(Register rd, Register rn, const Operand& operand) { Bics(al, rd, rn, operand); } void Bkpt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bkpt(cond, imm); } void Bkpt(uint32_t imm) { Bkpt(al, imm); } void Bl(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bl(cond, label); AddBranchLabel(label); } void Bl(Label* label) { Bl(al, label); } void Blx(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); blx(cond, label); AddBranchLabel(label); } void Blx(Label* label) { Blx(al, label); } void Blx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BLX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); blx(cond, rm); } void Blx(Register rm) { Blx(al, rm); } void Bx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); bx(cond, rm); } void Bx(Register rm) { Bx(al, rm); } void Bxj(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bxj(cond, rm); } void Bxj(Register rm) { Bxj(al, rm); } void Cbnz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbnz(rn, label); AddBranchLabel(label); } void Cbz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbz(rn, label); AddBranchLabel(label); } void Clrex(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clrex(cond); } void Clrex() { Clrex(al); } void Clz(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clz(cond, rd, rm); } void Clz(Register rd, Register rm) { Clz(al, rd, rm); } void Cmn(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMN{}{} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); asr(cond, rd, rm, operand); } void Asr(Register rd, Register rm, const Operand& operand) { Asr(al, rd, rm, operand); } void Asr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Asr(cond, rd, rm, operand); break; case SetFlags: Asrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Asrs(cond, rd, rm, operand); } else { Asr(cond, rd, rm, operand); } break; } } void Asr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Asr(flags, al, rd, rm, operand); } void Asrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); asrs(cond, rd, rm, operand); } void Asrs(Register rd, Register rm, const Operand& operand) { Asrs(al, rd, rm, operand); } void B(Condition cond, Label* label, BranchHint hint = kBranchWithoutHint) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (hint == kNear) { if (label->IsBound()) { b(cond, label); } else { b(cond, Narrow, label); } } else { b(cond, label); } AddBranchLabel(label); } void B(Label* label, BranchHint hint = kBranchWithoutHint) { B(al, label, hint); } void BPreferNear(Condition cond, Label* label) { B(cond, label, kNear); } void BPreferNear(Label* label) { B(al, label, kNear); } void Bfc(Condition cond, Register rd, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfc(cond, rd, lsb, operand); } void Bfc(Register rd, uint32_t lsb, const Operand& operand) { Bfc(al, rd, lsb, operand); } void Bfi(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bfi(cond, rd, rn, lsb, operand); } void Bfi(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Bfi(al, rd, rn, lsb, operand); } void Bic(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mov(rd, 0); return; } } bool can_use_it = // BIC{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); bic(cond, rd, rn, operand); } void Bic(Register rd, Register rn, const Operand& operand) { Bic(al, rd, rn, operand); } void Bic(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Bic(cond, rd, rn, operand); break; case SetFlags: Bics(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Bics(cond, rd, rn, operand); } else { Bic(cond, rd, rn, operand); } break; } } void Bic(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Bic(flags, al, rd, rn, operand); } void Bics(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bics(cond, rd, rn, operand); } void Bics(Register rd, Register rn, const Operand& operand) { Bics(al, rd, rn, operand); } void Bkpt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bkpt(cond, imm); } void Bkpt(uint32_t imm) { Bkpt(al, imm); } void Bl(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bl(cond, label); AddBranchLabel(label); } void Bl(Label* label) { Bl(al, label); } void Blx(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); blx(cond, label); AddBranchLabel(label); } void Blx(Label* label) { Blx(al, label); } void Blx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BLX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); blx(cond, rm); } void Blx(Register rm) { Blx(al, rm); } void Bx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); bx(cond, rm); } void Bx(Register rm) { Bx(al, rm); } void Bxj(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bxj(cond, rm); } void Bxj(Register rm) { Bxj(al, rm); } void Cbnz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbnz(rn, label); AddBranchLabel(label); } void Cbz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbz(rn, label); AddBranchLabel(label); } void Clrex(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clrex(cond); } void Clrex() { Clrex(al); } void Clz(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clz(cond, rd, rm); } void Clz(Register rd, Register rm) { Clz(al, rd, rm); } void Cmn(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMN{}{} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); bic(cond, rd, rn, operand); } void Bic(Register rd, Register rn, const Operand& operand) { Bic(al, rd, rn, operand); } void Bic(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Bic(cond, rd, rn, operand); break; case SetFlags: Bics(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Bics(cond, rd, rn, operand); } else { Bic(cond, rd, rn, operand); } break; } } void Bic(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Bic(flags, al, rd, rn, operand); } void Bics(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bics(cond, rd, rn, operand); } void Bics(Register rd, Register rn, const Operand& operand) { Bics(al, rd, rn, operand); } void Bkpt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bkpt(cond, imm); } void Bkpt(uint32_t imm) { Bkpt(al, imm); } void Bl(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bl(cond, label); AddBranchLabel(label); } void Bl(Label* label) { Bl(al, label); } void Blx(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); blx(cond, label); AddBranchLabel(label); } void Blx(Label* label) { Blx(al, label); } void Blx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BLX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); blx(cond, rm); } void Blx(Register rm) { Blx(al, rm); } void Bx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); bx(cond, rm); } void Bx(Register rm) { Bx(al, rm); } void Bxj(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bxj(cond, rm); } void Bxj(Register rm) { Bxj(al, rm); } void Cbnz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbnz(rn, label); AddBranchLabel(label); } void Cbz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbz(rn, label); AddBranchLabel(label); } void Clrex(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clrex(cond); } void Clrex() { Clrex(al); } void Clz(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clz(cond, rd, rm); } void Clz(Register rd, Register rm) { Clz(al, rd, rm); } void Cmn(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMN{}{} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); blx(cond, rm); } void Blx(Register rm) { Blx(al, rm); } void Bx(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // BX{}{} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); bx(cond, rm); } void Bx(Register rm) { Bx(al, rm); } void Bxj(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bxj(cond, rm); } void Bxj(Register rm) { Bxj(al, rm); } void Cbnz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbnz(rn, label); AddBranchLabel(label); } void Cbz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbz(rn, label); AddBranchLabel(label); } void Clrex(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clrex(cond); } void Clrex() { Clrex(al); } void Clz(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clz(cond, rd, rm); } void Clz(Register rd, Register rm) { Clz(al, rd, rm); } void Cmn(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMN{}{} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} ; T1 !rm.IsPC(); ITScope it_scope(this, &cond, can_use_it); bx(cond, rm); } void Bx(Register rm) { Bx(al, rm); } void Bxj(Condition cond, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); bxj(cond, rm); } void Bxj(Register rm) { Bxj(al, rm); } void Cbnz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbnz(rn, label); AddBranchLabel(label); } void Cbz(Register rn, Label* label) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); cbz(rn, label); AddBranchLabel(label); } void Clrex(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clrex(cond); } void Clrex() { Clrex(al); } void Clz(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); clz(cond, rd, rm); } void Clz(Register rd, Register rm) { Clz(al, rd, rm); } void Cmn(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMN{}{} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , ; T1 operand.IsPlainRegister() && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); cmn(cond, rn, operand); } void Cmn(Register rn, const Operand& operand) { Cmn(al, rn, operand); } void Cmp(Condition cond, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // CMP{}{} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , # ; T1 (operand.IsImmediate() && (operand.GetImmediate() <= 255) && rn.IsLow()) || // CMP{}{} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , ; T1 T2 (operand.IsPlainRegister() && !rn.IsPC() && !operand.GetBaseRegister().IsPC()); ITScope it_scope(this, &cond, can_use_it); cmp(cond, rn, operand); } void Cmp(Register rn, const Operand& operand) { Cmp(al, rn, operand); } void Crc32b(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32b(cond, rd, rn, rm); } void Crc32b(Register rd, Register rn, Register rm) { Crc32b(al, rd, rn, rm); } void Crc32cb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cb(cond, rd, rn, rm); } void Crc32cb(Register rd, Register rn, Register rm) { Crc32cb(al, rd, rn, rm); } void Crc32ch(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32ch(cond, rd, rn, rm); } void Crc32ch(Register rd, Register rn, Register rm) { Crc32ch(al, rd, rn, rm); } void Crc32cw(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32cw(cond, rd, rn, rm); } void Crc32cw(Register rd, Register rn, Register rm) { Crc32cw(al, rd, rn, rm); } void Crc32h(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32h(cond, rd, rn, rm); } void Crc32h(Register rd, Register rn, Register rm) { Crc32h(al, rd, rn, rm); } void Crc32w(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); crc32w(cond, rd, rn, rm); } void Crc32w(Register rd, Register rn, Register rm) { Crc32w(al, rd, rn, rm); } void Dmb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dmb(cond, option); } void Dmb(MemoryBarrier option) { Dmb(al, option); } void Dsb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); dsb(cond, option); } void Dsb(MemoryBarrier option) { Dsb(al, option); } void Eor(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } if (immediate == 0xffffffff) { mvn(rd, rn); return; } } bool can_use_it = // EOR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); eor(cond, rd, rn, operand); } void Eor(Register rd, Register rn, const Operand& operand) { Eor(al, rd, rn, operand); } void Eor(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Eor(cond, rd, rn, operand); break; case SetFlags: Eors(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Eors(cond, rd, rn, operand); } else { Eor(cond, rd, rn, operand); } break; } } void Eor(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Eor(flags, al, rd, rn, operand); } void Eors(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); eors(cond, rd, rn, operand); } void Eors(Register rd, Register rn, const Operand& operand) { Eors(al, rd, rn, operand); } void Fldmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmdbx(cond, rn, write_back, dreglist); } void Fldmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmdbx(al, rn, write_back, dreglist); } void Fldmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fldmiax(cond, rn, write_back, dreglist); } void Fldmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fldmiax(al, rn, write_back, dreglist); } void Fstmdbx(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmdbx(cond, rn, write_back, dreglist); } void Fstmdbx(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmdbx(al, rn, write_back, dreglist); } void Fstmiax(Condition cond, Register rn, WriteBack write_back, DRegisterList dreglist) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(dreglist)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); fstmiax(cond, rn, write_back, dreglist); } void Fstmiax(Register rn, WriteBack write_back, DRegisterList dreglist) { Fstmiax(al, rn, write_back, dreglist); } void Hlt(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hlt(cond, imm); } void Hlt(uint32_t imm) { Hlt(al, imm); } void Hvc(Condition cond, uint32_t imm) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); hvc(cond, imm); } void Hvc(uint32_t imm) { Hvc(al, imm); } void Isb(Condition cond, MemoryBarrier option) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); isb(cond, option); } void Isb(MemoryBarrier option) { Isb(al, option); } void Lda(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lda(cond, rt, operand); } void Lda(Register rt, const MemOperand& operand) { Lda(al, rt, operand); } void Ldab(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldab(cond, rt, operand); } void Ldab(Register rt, const MemOperand& operand) { Ldab(al, rt, operand); } void Ldaex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaex(cond, rt, operand); } void Ldaex(Register rt, const MemOperand& operand) { Ldaex(al, rt, operand); } void Ldaexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexb(cond, rt, operand); } void Ldaexb(Register rt, const MemOperand& operand) { Ldaexb(al, rt, operand); } void Ldaexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexd(cond, rt, rt2, operand); } void Ldaexd(Register rt, Register rt2, const MemOperand& operand) { Ldaexd(al, rt, rt2, operand); } void Ldaexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldaexh(cond, rt, operand); } void Ldaexh(Register rt, const MemOperand& operand) { Ldaexh(al, rt, operand); } void Ldah(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldah(cond, rt, operand); } void Ldah(Register rt, const MemOperand& operand) { Ldah(al, rt, operand); } void Ldm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldm(cond, rn, write_back, registers); } void Ldm(Register rn, WriteBack write_back, RegisterList registers) { Ldm(al, rn, write_back, registers); } void Ldmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmda(cond, rn, write_back, registers); } void Ldmda(Register rn, WriteBack write_back, RegisterList registers) { Ldmda(al, rn, write_back, registers); } void Ldmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmdb(cond, rn, write_back, registers); } void Ldmdb(Register rn, WriteBack write_back, RegisterList registers) { Ldmdb(al, rn, write_back, registers); } void Ldmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmea(cond, rn, write_back, registers); } void Ldmea(Register rn, WriteBack write_back, RegisterList registers) { Ldmea(al, rn, write_back, registers); } void Ldmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmed(cond, rn, write_back, registers); } void Ldmed(Register rn, WriteBack write_back, RegisterList registers) { Ldmed(al, rn, write_back, registers); } void Ldmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfa(cond, rn, write_back, registers); } void Ldmfa(Register rn, WriteBack write_back, RegisterList registers) { Ldmfa(al, rn, write_back, registers); } void Ldmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmfd(cond, rn, write_back, registers); } void Ldmfd(Register rn, WriteBack write_back, RegisterList registers) { Ldmfd(al, rn, write_back, registers); } void Ldmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldmib(cond, rn, write_back, registers); } void Ldmib(Register rn, WriteBack write_back, RegisterList registers) { Ldmib(al, rn, write_back, registers); } void Ldr(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // LDR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldr(cond, rt, operand); } void Ldr(Register rt, const MemOperand& operand) { Ldr(al, rt, operand); } void Ldrb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // LDRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrb(cond, rt, operand); } void Ldrb(Register rt, const MemOperand& operand) { Ldrb(al, rt, operand); } void Ldrd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrd(cond, rt, rt2, operand); } void Ldrd(Register rt, Register rt2, const MemOperand& operand) { Ldrd(al, rt, rt2, operand); } void Ldrex(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrex(cond, rt, operand); } void Ldrex(Register rt, const MemOperand& operand) { Ldrex(al, rt, operand); } void Ldrexb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexb(cond, rt, operand); } void Ldrexb(Register rt, const MemOperand& operand) { Ldrexb(al, rt, operand); } void Ldrexd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexd(cond, rt, rt2, operand); } void Ldrexd(Register rt, Register rt2, const MemOperand& operand) { Ldrexd(al, rt, rt2, operand); } void Ldrexh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ldrexh(cond, rt, operand); } void Ldrexh(Register rt, const MemOperand& operand) { Ldrexh(al, rt, operand); } void Ldrh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // LDRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); ldrh(cond, rt, operand); } void Ldrh(Register rt, const MemOperand& operand) { Ldrh(al, rt, operand); } void Ldrsb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSB{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsb(cond, rt, operand); } void Ldrsb(Register rt, const MemOperand& operand) { Ldrsb(al, rt, operand); } void Ldrsh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LDRSH{}{} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [, {+}] ; T1 operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset); ITScope it_scope(this, &cond, can_use_it); ldrsh(cond, rt, operand); } void Ldrsh(Register rt, const MemOperand& operand) { Ldrsh(al, rt, operand); } void Lsl(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSL{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 31) && rd.IsLow() && rm.IsLow()) || // LSL{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsl(cond, rd, rm, operand); } void Lsl(Register rd, Register rm, const Operand& operand) { Lsl(al, rd, rm, operand); } void Lsl(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsl(cond, rd, rm, operand); break; case SetFlags: Lsls(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() < 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsls(cond, rd, rm, operand); } else { Lsl(cond, rd, rm, operand); } break; } } void Lsl(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsl(flags, al, rd, rm, operand); } void Lsls(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsls(cond, rd, rm, operand); } void Lsls(Register rd, Register rm, const Operand& operand) { Lsls(al, rd, rm, operand); } void Lsr(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // LSR{} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} , # ; T2 (operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32) && rd.IsLow() && rm.IsLow()) || // LSR{} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} , ; T1 (operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); lsr(cond, rd, rm, operand); } void Lsr(Register rd, Register rm, const Operand& operand) { Lsr(al, rd, rm, operand); } void Lsr(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Lsr(cond, rd, rm, operand); break; case SetFlags: Lsrs(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && ((operand.IsImmediate() && (operand.GetImmediate() >= 1) && (operand.GetImmediate() <= 32)) || (operand.IsPlainRegister() && rd.Is(rm))); if (setflags_is_smaller) { Lsrs(cond, rd, rm, operand); } else { Lsr(cond, rd, rm, operand); } break; } } void Lsr(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Lsr(flags, al, rd, rm, operand); } void Lsrs(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); lsrs(cond, rd, rm, operand); } void Lsrs(Register rd, Register rm, const Operand& operand) { Lsrs(al, rd, rm, operand); } void Mla(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mla(cond, rd, rn, rm, ra); } void Mla(Register rd, Register rn, Register rm, Register ra) { Mla(al, rd, rn, rm, ra); } void Mla(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm, Register ra) { switch (flags) { case LeaveFlags: Mla(cond, rd, rn, rm, ra); break; case SetFlags: Mlas(cond, rd, rn, rm, ra); break; case DontCare: Mla(cond, rd, rn, rm, ra); break; } } void Mla( FlagsUpdate flags, Register rd, Register rn, Register rm, Register ra) { Mla(flags, al, rd, rn, rm, ra); } void Mlas( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mlas(cond, rd, rn, rm, ra); } void Mlas(Register rd, Register rn, Register rm, Register ra) { Mlas(al, rd, rn, rm, ra); } void Mls(Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mls(cond, rd, rn, rm, ra); } void Mls(Register rd, Register rn, Register rm, Register ra) { Mls(al, rd, rn, rm, ra); } void Mov(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool can_use_it = // MOV{} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , # ; T1 (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() <= 255)) || // MOV{}{} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , ; T1 (operand.IsPlainRegister() && !rd.IsPC() && !operand.GetBaseRegister().IsPC()) || // MOV{} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , {, #} ; T2 (operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR))) || // MOV{} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , , LSL ; T1 // MOV{} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , , LSR ; T1 // MOV{} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , , ASR ; T1 // MOV{} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , , ROR ; T1 (operand.IsRegisterShiftedRegister() && rd.Is(operand.GetBaseRegister()) && rd.IsLow() && (operand.GetShift().Is(LSL) || operand.GetShift().Is(LSR) || operand.GetShift().Is(ASR) || operand.GetShift().Is(ROR)) && operand.GetShiftRegister().IsLow()); ITScope it_scope(this, &cond, can_use_it); mov(cond, rd, operand); } void Mov(Register rd, const Operand& operand) { Mov(al, rd, operand); } void Mov(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mov(cond, rd, operand); break; case SetFlags: Movs(cond, rd, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && ((operand.IsImmediateShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow() && (operand.GetShiftAmount() >= 1) && (((operand.GetShiftAmount() <= 32) && ((operand.GetShift().IsLSR() || operand.GetShift().IsASR()))) || ((operand.GetShiftAmount() < 32) && operand.GetShift().IsLSL()))) || (operand.IsRegisterShiftedRegister() && rd.IsLow() && operand.GetBaseRegister().Is(rd) && operand.GetShiftRegister().IsLow() && (operand.GetShift().IsLSL() || operand.GetShift().IsLSR() || operand.GetShift().IsASR() || operand.GetShift().IsROR())) || (operand.IsImmediate() && rd.IsLow() && (operand.GetImmediate() < 256))); if (setflags_is_smaller) { Movs(cond, rd, operand); } else { Mov(cond, rd, operand); } break; } } void Mov(FlagsUpdate flags, Register rd, const Operand& operand) { Mov(flags, al, rd, operand); } void Movs(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movs(cond, rd, operand); } void Movs(Register rd, const Operand& operand) { Movs(al, rd, operand); } void Movt(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); movt(cond, rd, operand); } void Movt(Register rd, const Operand& operand) { Movt(al, rd, operand); } void Mrs(Condition cond, Register rd, SpecialRegister spec_reg) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mrs(cond, rd, spec_reg); } void Mrs(Register rd, SpecialRegister spec_reg) { Mrs(al, rd, spec_reg); } void Msr(Condition cond, MaskedSpecialRegister spec_reg, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); msr(cond, spec_reg, operand); } void Msr(MaskedSpecialRegister spec_reg, const Operand& operand) { Msr(al, spec_reg, operand); } void Mul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MUL{} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , {, } ; T1 rd.Is(rm) && rn.IsLow() && rm.IsLow(); ITScope it_scope(this, &cond, can_use_it); mul(cond, rd, rn, rm); } void Mul(Register rd, Register rn, Register rm) { Mul(al, rd, rn, rm); } void Mul(FlagsUpdate flags, Condition cond, Register rd, Register rn, Register rm) { switch (flags) { case LeaveFlags: Mul(cond, rd, rn, rm); break; case SetFlags: Muls(cond, rd, rn, rm); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && rm.Is(rd); if (setflags_is_smaller) { Muls(cond, rd, rn, rm); } else { Mul(cond, rd, rn, rm); } break; } } void Mul(FlagsUpdate flags, Register rd, Register rn, Register rm) { Mul(flags, al, rd, rn, rm); } void Muls(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); muls(cond, rd, rn, rm); } void Muls(Register rd, Register rn, Register rm) { Muls(al, rd, rn, rm); } void Mvn(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // MVN{} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , ; T1 operand.IsPlainRegister() && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); mvn(cond, rd, operand); } void Mvn(Register rd, const Operand& operand) { Mvn(al, rd, operand); } void Mvn(FlagsUpdate flags, Condition cond, Register rd, const Operand& operand) { switch (flags) { case LeaveFlags: Mvn(cond, rd, operand); break; case SetFlags: Mvns(cond, rd, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Mvns(cond, rd, operand); } else { Mvn(cond, rd, operand); } break; } } void Mvn(FlagsUpdate flags, Register rd, const Operand& operand) { Mvn(flags, al, rd, operand); } void Mvns(Condition cond, Register rd, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); mvns(cond, rd, operand); } void Mvns(Register rd, const Operand& operand) { Mvns(al, rd, operand); } void Nop(Condition cond) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); nop(cond); } void Nop() { Nop(al); } void Orn(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { mvn(rd, 0); return; } if ((immediate == 0xffffffff) && rd.Is(rn)) { return; } } ITScope it_scope(this, &cond); orn(cond, rd, rn, operand); } void Orn(Register rd, Register rn, const Operand& operand) { Orn(al, rd, rn, operand); } void Orn(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orn(cond, rd, rn, operand); break; case SetFlags: Orns(cond, rd, rn, operand); break; case DontCare: Orn(cond, rd, rn, operand); break; } } void Orn(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orn(flags, al, rd, rn, operand); } void Orns(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orns(cond, rd, rn, operand); } void Orns(Register rd, Register rn, const Operand& operand) { Orns(al, rd, rn, operand); } void Orr(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (rd.Is(rn) && operand.IsPlainRegister() && rd.Is(operand.GetBaseRegister())) { return; } if (cond.Is(al) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if ((immediate == 0) && rd.Is(rn)) { return; } if (immediate == 0xffffffff) { mvn(rd, 0); return; } } bool can_use_it = // ORR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rn) && rn.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); orr(cond, rd, rn, operand); } void Orr(Register rd, Register rn, const Operand& operand) { Orr(al, rd, rn, operand); } void Orr(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Orr(cond, rd, rn, operand); break; case SetFlags: Orrs(cond, rd, rn, operand); break; case DontCare: if (operand.IsPlainRegister() && rd.Is(rn) && rd.Is(operand.GetBaseRegister())) { return; } bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Orrs(cond, rd, rn, operand); } else { Orr(cond, rd, rn, operand); } break; } } void Orr(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Orr(flags, al, rd, rn, operand); } void Orrs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); orrs(cond, rd, rn, operand); } void Orrs(Register rd, Register rn, const Operand& operand) { Orrs(al, rd, rn, operand); } void Pkhbt(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhbt(cond, rd, rn, operand); } void Pkhbt(Register rd, Register rn, const Operand& operand) { Pkhbt(al, rd, rn, operand); } void Pkhtb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pkhtb(cond, rd, rn, operand); } void Pkhtb(Register rd, Register rn, const Operand& operand) { Pkhtb(al, rd, rn, operand); } void Pld(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, label); } void Pld(Label* label) { Pld(al, label); } void Pld(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pld(cond, operand); } void Pld(const MemOperand& operand) { Pld(al, operand); } void Pldw(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pldw(cond, operand); } void Pldw(const MemOperand& operand) { Pldw(al, operand); } void Pli(Condition cond, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, operand); } void Pli(const MemOperand& operand) { Pli(al, operand); } void Pli(Condition cond, Label* label) { VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pli(cond, label); } void Pli(Label* label) { Pli(al, label); } void Pop(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, registers); } void Pop(RegisterList registers) { Pop(al, registers); } void Pop(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); pop(cond, rt); } void Pop(Register rt) { Pop(al, rt); } void Push(Condition cond, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, registers); } void Push(RegisterList registers) { Push(al, registers); } void Push(Condition cond, Register rt) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); push(cond, rt); } void Push(Register rt) { Push(al, rt); } void Qadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd(cond, rd, rm, rn); } void Qadd(Register rd, Register rm, Register rn) { Qadd(al, rd, rm, rn); } void Qadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd16(cond, rd, rn, rm); } void Qadd16(Register rd, Register rn, Register rm) { Qadd16(al, rd, rn, rm); } void Qadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qadd8(cond, rd, rn, rm); } void Qadd8(Register rd, Register rn, Register rm) { Qadd8(al, rd, rn, rm); } void Qasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qasx(cond, rd, rn, rm); } void Qasx(Register rd, Register rn, Register rm) { Qasx(al, rd, rn, rm); } void Qdadd(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdadd(cond, rd, rm, rn); } void Qdadd(Register rd, Register rm, Register rn) { Qdadd(al, rd, rm, rn); } void Qdsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qdsub(cond, rd, rm, rn); } void Qdsub(Register rd, Register rm, Register rn) { Qdsub(al, rd, rm, rn); } void Qsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsax(cond, rd, rn, rm); } void Qsax(Register rd, Register rn, Register rm) { Qsax(al, rd, rn, rm); } void Qsub(Condition cond, Register rd, Register rm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub(cond, rd, rm, rn); } void Qsub(Register rd, Register rm, Register rn) { Qsub(al, rd, rm, rn); } void Qsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub16(cond, rd, rn, rm); } void Qsub16(Register rd, Register rn, Register rm) { Qsub16(al, rd, rn, rm); } void Qsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); qsub8(cond, rd, rn, rm); } void Qsub8(Register rd, Register rn, Register rm) { Qsub8(al, rd, rn, rm); } void Rbit(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rbit(cond, rd, rm); } void Rbit(Register rd, Register rm) { Rbit(al, rd, rm); } void Rev(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev(cond, rd, rm); } void Rev(Register rd, Register rm) { Rev(al, rd, rm); } void Rev16(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rev16(cond, rd, rm); } void Rev16(Register rd, Register rm) { Rev16(al, rd, rm); } void Revsh(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); revsh(cond, rd, rm); } void Revsh(Register rd, Register rm) { Revsh(al, rd, rm); } void Ror(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // ROR{} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} , ; T1 operand.IsPlainRegister() && rd.Is(rm) && rd.IsLow() && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); ror(cond, rd, rm, operand); } void Ror(Register rd, Register rm, const Operand& operand) { Ror(al, rd, rm, operand); } void Ror(FlagsUpdate flags, Condition cond, Register rd, Register rm, const Operand& operand) { switch (flags) { case LeaveFlags: Ror(cond, rd, rm, operand); break; case SetFlags: Rors(cond, rd, rm, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rm.IsLow() && operand.IsPlainRegister() && rd.Is(rm); if (setflags_is_smaller) { Rors(cond, rd, rm, operand); } else { Ror(cond, rd, rm, operand); } break; } } void Ror(FlagsUpdate flags, Register rd, Register rm, const Operand& operand) { Ror(flags, al, rd, rm, operand); } void Rors(Condition cond, Register rd, Register rm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rors(cond, rd, rm, operand); } void Rors(Register rd, Register rm, const Operand& operand) { Rors(al, rd, rm, operand); } void Rrx(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrx(cond, rd, rm); } void Rrx(Register rd, Register rm) { Rrx(al, rd, rm); } void Rrx(FlagsUpdate flags, Condition cond, Register rd, Register rm) { switch (flags) { case LeaveFlags: Rrx(cond, rd, rm); break; case SetFlags: Rrxs(cond, rd, rm); break; case DontCare: Rrx(cond, rd, rm); break; } } void Rrx(FlagsUpdate flags, Register rd, Register rm) { Rrx(flags, al, rd, rm); } void Rrxs(Condition cond, Register rd, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rrxs(cond, rd, rm); } void Rrxs(Register rd, Register rm) { Rrxs(al, rd, rm); } void Rsb(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // RSB{} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {, }, #0 ; T1 operand.IsImmediate() && rd.IsLow() && rn.IsLow() && (operand.GetImmediate() == 0); ITScope it_scope(this, &cond, can_use_it); rsb(cond, rd, rn, operand); } void Rsb(Register rd, Register rn, const Operand& operand) { Rsb(al, rd, rn, operand); } void Rsb(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsb(cond, rd, rn, operand); break; case SetFlags: Rsbs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.IsLow() && operand.IsImmediate() && (operand.GetImmediate() == 0); if (setflags_is_smaller) { Rsbs(cond, rd, rn, operand); } else { Rsb(cond, rd, rn, operand); } break; } } void Rsb(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsb(flags, al, rd, rn, operand); } void Rsbs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsbs(cond, rd, rn, operand); } void Rsbs(Register rd, Register rn, const Operand& operand) { Rsbs(al, rd, rn, operand); } void Rsc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rsc(cond, rd, rn, operand); } void Rsc(Register rd, Register rn, const Operand& operand) { Rsc(al, rd, rn, operand); } void Rsc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Rsc(cond, rd, rn, operand); break; case SetFlags: Rscs(cond, rd, rn, operand); break; case DontCare: Rsc(cond, rd, rn, operand); break; } } void Rsc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Rsc(flags, al, rd, rn, operand); } void Rscs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); rscs(cond, rd, rn, operand); } void Rscs(Register rd, Register rn, const Operand& operand) { Rscs(al, rd, rn, operand); } void Sadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd16(cond, rd, rn, rm); } void Sadd16(Register rd, Register rn, Register rm) { Sadd16(al, rd, rn, rm); } void Sadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sadd8(cond, rd, rn, rm); } void Sadd8(Register rd, Register rn, Register rm) { Sadd8(al, rd, rn, rm); } void Sasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sasx(cond, rd, rn, rm); } void Sasx(Register rd, Register rn, Register rm) { Sasx(al, rd, rn, rm); } void Sbc(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // SBC{} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} {,} , ; T1 operand.IsPlainRegister() && rn.IsLow() && rd.Is(rn) && operand.GetBaseRegister().IsLow(); ITScope it_scope(this, &cond, can_use_it); sbc(cond, rd, rn, operand); } void Sbc(Register rd, Register rn, const Operand& operand) { Sbc(al, rd, rn, operand); } void Sbc(FlagsUpdate flags, Condition cond, Register rd, Register rn, const Operand& operand) { switch (flags) { case LeaveFlags: Sbc(cond, rd, rn, operand); break; case SetFlags: Sbcs(cond, rd, rn, operand); break; case DontCare: bool setflags_is_smaller = IsUsingT32() && cond.Is(al) && rd.IsLow() && rn.Is(rd) && operand.IsPlainRegister() && operand.GetBaseRegister().IsLow(); if (setflags_is_smaller) { Sbcs(cond, rd, rn, operand); } else { Sbc(cond, rd, rn, operand); } break; } } void Sbc(FlagsUpdate flags, Register rd, Register rn, const Operand& operand) { Sbc(flags, al, rd, rn, operand); } void Sbcs(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbcs(cond, rd, rn, operand); } void Sbcs(Register rd, Register rn, const Operand& operand) { Sbcs(al, rd, rn, operand); } void Sbfx(Condition cond, Register rd, Register rn, uint32_t lsb, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sbfx(cond, rd, rn, lsb, operand); } void Sbfx(Register rd, Register rn, uint32_t lsb, const Operand& operand) { Sbfx(al, rd, rn, lsb, operand); } void Sdiv(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sdiv(cond, rd, rn, rm); } void Sdiv(Register rd, Register rn, Register rm) { Sdiv(al, rd, rn, rm); } void Sel(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); sel(cond, rd, rn, rm); } void Sel(Register rd, Register rn, Register rm) { Sel(al, rd, rn, rm); } void Shadd16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd16(cond, rd, rn, rm); } void Shadd16(Register rd, Register rn, Register rm) { Shadd16(al, rd, rn, rm); } void Shadd8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shadd8(cond, rd, rn, rm); } void Shadd8(Register rd, Register rn, Register rm) { Shadd8(al, rd, rn, rm); } void Shasx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shasx(cond, rd, rn, rm); } void Shasx(Register rd, Register rn, Register rm) { Shasx(al, rd, rn, rm); } void Shsax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsax(cond, rd, rn, rm); } void Shsax(Register rd, Register rn, Register rm) { Shsax(al, rd, rn, rm); } void Shsub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub16(cond, rd, rn, rm); } void Shsub16(Register rd, Register rn, Register rm) { Shsub16(al, rd, rn, rm); } void Shsub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); shsub8(cond, rd, rn, rm); } void Shsub8(Register rd, Register rn, Register rm) { Shsub8(al, rd, rn, rm); } void Smlabb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabb(cond, rd, rn, rm, ra); } void Smlabb(Register rd, Register rn, Register rm, Register ra) { Smlabb(al, rd, rn, rm, ra); } void Smlabt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlabt(cond, rd, rn, rm, ra); } void Smlabt(Register rd, Register rn, Register rm, Register ra) { Smlabt(al, rd, rn, rm, ra); } void Smlad( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlad(cond, rd, rn, rm, ra); } void Smlad(Register rd, Register rn, Register rm, Register ra) { Smlad(al, rd, rn, rm, ra); } void Smladx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smladx(cond, rd, rn, rm, ra); } void Smladx(Register rd, Register rn, Register rm, Register ra) { Smladx(al, rd, rn, rm, ra); } void Smlal( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlal(cond, rdlo, rdhi, rn, rm); } void Smlal(Register rdlo, Register rdhi, Register rn, Register rm) { Smlal(al, rdlo, rdhi, rn, rm); } void Smlalbb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbb(cond, rdlo, rdhi, rn, rm); } void Smlalbb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbb(al, rdlo, rdhi, rn, rm); } void Smlalbt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlalbt(cond, rdlo, rdhi, rn, rm); } void Smlalbt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlalbt(al, rdlo, rdhi, rn, rm); } void Smlald( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlald(cond, rdlo, rdhi, rn, rm); } void Smlald(Register rdlo, Register rdhi, Register rn, Register rm) { Smlald(al, rdlo, rdhi, rn, rm); } void Smlaldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaldx(cond, rdlo, rdhi, rn, rm); } void Smlaldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaldx(al, rdlo, rdhi, rn, rm); } void Smlals( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlals(cond, rdlo, rdhi, rn, rm); } void Smlals(Register rdlo, Register rdhi, Register rn, Register rm) { Smlals(al, rdlo, rdhi, rn, rm); } void Smlaltb( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltb(cond, rdlo, rdhi, rn, rm); } void Smlaltb(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltb(al, rdlo, rdhi, rn, rm); } void Smlaltt( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlaltt(cond, rdlo, rdhi, rn, rm); } void Smlaltt(Register rdlo, Register rdhi, Register rn, Register rm) { Smlaltt(al, rdlo, rdhi, rn, rm); } void Smlatb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatb(cond, rd, rn, rm, ra); } void Smlatb(Register rd, Register rn, Register rm, Register ra) { Smlatb(al, rd, rn, rm, ra); } void Smlatt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlatt(cond, rd, rn, rm, ra); } void Smlatt(Register rd, Register rn, Register rm, Register ra) { Smlatt(al, rd, rn, rm, ra); } void Smlawb( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawb(cond, rd, rn, rm, ra); } void Smlawb(Register rd, Register rn, Register rm, Register ra) { Smlawb(al, rd, rn, rm, ra); } void Smlawt( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlawt(cond, rd, rn, rm, ra); } void Smlawt(Register rd, Register rn, Register rm, Register ra) { Smlawt(al, rd, rn, rm, ra); } void Smlsd( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsd(cond, rd, rn, rm, ra); } void Smlsd(Register rd, Register rn, Register rm, Register ra) { Smlsd(al, rd, rn, rm, ra); } void Smlsdx( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsdx(cond, rd, rn, rm, ra); } void Smlsdx(Register rd, Register rn, Register rm, Register ra) { Smlsdx(al, rd, rn, rm, ra); } void Smlsld( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsld(cond, rdlo, rdhi, rn, rm); } void Smlsld(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsld(al, rdlo, rdhi, rn, rm); } void Smlsldx( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smlsldx(cond, rdlo, rdhi, rn, rm); } void Smlsldx(Register rdlo, Register rdhi, Register rn, Register rm) { Smlsldx(al, rdlo, rdhi, rn, rm); } void Smmla( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmla(cond, rd, rn, rm, ra); } void Smmla(Register rd, Register rn, Register rm, Register ra) { Smmla(al, rd, rn, rm, ra); } void Smmlar( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlar(cond, rd, rn, rm, ra); } void Smmlar(Register rd, Register rn, Register rm, Register ra) { Smmlar(al, rd, rn, rm, ra); } void Smmls( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmls(cond, rd, rn, rm, ra); } void Smmls(Register rd, Register rn, Register rm, Register ra) { Smmls(al, rd, rn, rm, ra); } void Smmlsr( Condition cond, Register rd, Register rn, Register rm, Register ra) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(!AliasesAvailableScratchRegister(ra)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmlsr(cond, rd, rn, rm, ra); } void Smmlsr(Register rd, Register rn, Register rm, Register ra) { Smmlsr(al, rd, rn, rm, ra); } void Smmul(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmul(cond, rd, rn, rm); } void Smmul(Register rd, Register rn, Register rm) { Smmul(al, rd, rn, rm); } void Smmulr(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smmulr(cond, rd, rn, rm); } void Smmulr(Register rd, Register rn, Register rm) { Smmulr(al, rd, rn, rm); } void Smuad(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuad(cond, rd, rn, rm); } void Smuad(Register rd, Register rn, Register rm) { Smuad(al, rd, rn, rm); } void Smuadx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smuadx(cond, rd, rn, rm); } void Smuadx(Register rd, Register rn, Register rm) { Smuadx(al, rd, rn, rm); } void Smulbb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbb(cond, rd, rn, rm); } void Smulbb(Register rd, Register rn, Register rm) { Smulbb(al, rd, rn, rm); } void Smulbt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulbt(cond, rd, rn, rm); } void Smulbt(Register rd, Register rn, Register rm) { Smulbt(al, rd, rn, rm); } void Smull( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smull(cond, rdlo, rdhi, rn, rm); } void Smull(Register rdlo, Register rdhi, Register rn, Register rm) { Smull(al, rdlo, rdhi, rn, rm); } void Smull(FlagsUpdate flags, Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { switch (flags) { case LeaveFlags: Smull(cond, rdlo, rdhi, rn, rm); break; case SetFlags: Smulls(cond, rdlo, rdhi, rn, rm); break; case DontCare: Smull(cond, rdlo, rdhi, rn, rm); break; } } void Smull(FlagsUpdate flags, Register rdlo, Register rdhi, Register rn, Register rm) { Smull(flags, al, rdlo, rdhi, rn, rm); } void Smulls( Condition cond, Register rdlo, Register rdhi, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rdlo)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rdhi)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulls(cond, rdlo, rdhi, rn, rm); } void Smulls(Register rdlo, Register rdhi, Register rn, Register rm) { Smulls(al, rdlo, rdhi, rn, rm); } void Smultb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultb(cond, rd, rn, rm); } void Smultb(Register rd, Register rn, Register rm) { Smultb(al, rd, rn, rm); } void Smultt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smultt(cond, rd, rn, rm); } void Smultt(Register rd, Register rn, Register rm) { Smultt(al, rd, rn, rm); } void Smulwb(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwb(cond, rd, rn, rm); } void Smulwb(Register rd, Register rn, Register rm) { Smulwb(al, rd, rn, rm); } void Smulwt(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smulwt(cond, rd, rn, rm); } void Smulwt(Register rd, Register rn, Register rm) { Smulwt(al, rd, rn, rm); } void Smusd(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusd(cond, rd, rn, rm); } void Smusd(Register rd, Register rn, Register rm) { Smusd(al, rd, rn, rm); } void Smusdx(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); smusdx(cond, rd, rn, rm); } void Smusdx(Register rd, Register rn, Register rm) { Smusdx(al, rd, rn, rm); } void Ssat(Condition cond, Register rd, uint32_t imm, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat(cond, rd, imm, operand); } void Ssat(Register rd, uint32_t imm, const Operand& operand) { Ssat(al, rd, imm, operand); } void Ssat16(Condition cond, Register rd, uint32_t imm, Register rn) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssat16(cond, rd, imm, rn); } void Ssat16(Register rd, uint32_t imm, Register rn) { Ssat16(al, rd, imm, rn); } void Ssax(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssax(cond, rd, rn, rm); } void Ssax(Register rd, Register rn, Register rm) { Ssax(al, rd, rn, rm); } void Ssub16(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub16(cond, rd, rn, rm); } void Ssub16(Register rd, Register rn, Register rm) { Ssub16(al, rd, rn, rm); } void Ssub8(Condition cond, Register rd, Register rn, Register rm) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rm)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); ssub8(cond, rd, rn, rm); } void Ssub8(Register rd, Register rn, Register rm) { Ssub8(al, rd, rn, rm); } void Stl(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stl(cond, rt, operand); } void Stl(Register rt, const MemOperand& operand) { Stl(al, rt, operand); } void Stlb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlb(cond, rt, operand); } void Stlb(Register rt, const MemOperand& operand) { Stlb(al, rt, operand); } void Stlex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlex(cond, rd, rt, operand); } void Stlex(Register rd, Register rt, const MemOperand& operand) { Stlex(al, rd, rt, operand); } void Stlexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexb(cond, rd, rt, operand); } void Stlexb(Register rd, Register rt, const MemOperand& operand) { Stlexb(al, rd, rt, operand); } void Stlexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexd(cond, rd, rt, rt2, operand); } void Stlexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Stlexd(al, rd, rt, rt2, operand); } void Stlexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlexh(cond, rd, rt, operand); } void Stlexh(Register rd, Register rt, const MemOperand& operand) { Stlexh(al, rd, rt, operand); } void Stlh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stlh(cond, rt, operand); } void Stlh(Register rt, const MemOperand& operand) { Stlh(al, rt, operand); } void Stm(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stm(cond, rn, write_back, registers); } void Stm(Register rn, WriteBack write_back, RegisterList registers) { Stm(al, rn, write_back, registers); } void Stmda(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmda(cond, rn, write_back, registers); } void Stmda(Register rn, WriteBack write_back, RegisterList registers) { Stmda(al, rn, write_back, registers); } void Stmdb(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmdb(cond, rn, write_back, registers); } void Stmdb(Register rn, WriteBack write_back, RegisterList registers) { Stmdb(al, rn, write_back, registers); } void Stmea(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmea(cond, rn, write_back, registers); } void Stmea(Register rn, WriteBack write_back, RegisterList registers) { Stmea(al, rn, write_back, registers); } void Stmed(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmed(cond, rn, write_back, registers); } void Stmed(Register rn, WriteBack write_back, RegisterList registers) { Stmed(al, rn, write_back, registers); } void Stmfa(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfa(cond, rn, write_back, registers); } void Stmfa(Register rn, WriteBack write_back, RegisterList registers) { Stmfa(al, rn, write_back, registers); } void Stmfd(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmfd(cond, rn, write_back, registers); } void Stmfd(Register rn, WriteBack write_back, RegisterList registers) { Stmfd(al, rn, write_back, registers); } void Stmib(Condition cond, Register rn, WriteBack write_back, RegisterList registers) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(registers)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); stmib(cond, rn, write_back, registers); } void Stmib(Register rn, WriteBack write_back, RegisterList registers) { Stmib(al, rn, write_back, registers); } void Str(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STR{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 124, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [SP{, #{+}}] ; T2 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsSP() && operand.IsOffsetImmediateWithinRange(0, 1020, 4) && (operand.GetAddrMode() == Offset)) || // STR{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); str(cond, rt, operand); } void Str(Register rt, const MemOperand& operand) { Str(al, rt, operand); } void Strb(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRB{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 31) && (operand.GetAddrMode() == Offset)) || // STRB{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strb(cond, rt, operand); } void Strb(Register rt, const MemOperand& operand) { Strb(al, rt, operand); } void Strd(Condition cond, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strd(cond, rt, rt2, operand); } void Strd(Register rt, Register rt2, const MemOperand& operand) { Strd(al, rt, rt2, operand); } void Strex(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strex(cond, rd, rt, operand); } void Strex(Register rd, Register rt, const MemOperand& operand) { Strex(al, rd, rt, operand); } void Strexb(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexb(cond, rd, rt, operand); } void Strexb(Register rd, Register rt, const MemOperand& operand) { Strexb(al, rd, rt, operand); } void Strexd(Condition cond, Register rd, Register rt, Register rt2, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt2)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexd(cond, rd, rt, rt2, operand); } void Strexd(Register rd, Register rt, Register rt2, const MemOperand& operand) { Strexd(al, rd, rt, rt2, operand); } void Strexh(Condition cond, Register rd, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); ITScope it_scope(this, &cond); strexh(cond, rd, rt, operand); } void Strexh(Register rd, Register rt, const MemOperand& operand) { Strexh(al, rd, rt, operand); } void Strh(Condition cond, Register rt, const MemOperand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rt)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); bool can_use_it = // STRH{}{} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [ {, #{+}}] ; T1 (operand.IsImmediate() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.IsOffsetImmediateWithinRange(0, 62, 2) && (operand.GetAddrMode() == Offset)) || // STRH{}{} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB
} , [, {+}] ; T1 (operand.IsPlainRegister() && rt.IsLow() && operand.GetBaseRegister().IsLow() && operand.GetOffsetRegister().IsLow() && operand.GetSign().IsPlus() && (operand.GetAddrMode() == Offset)); ITScope it_scope(this, &cond, can_use_it); strh(cond, rt, operand); } void Strh(Register rt, const MemOperand& operand) { Strh(al, rt, operand); } void Sub(Condition cond, Register rd, Register rn, const Operand& operand) { VIXL_ASSERT(!AliasesAvailableScratchRegister(rd)); VIXL_ASSERT(!AliasesAvailableScratchRegister(rn)); VIXL_ASSERT(!AliasesAvailableScratchRegister(operand)); VIXL_ASSERT(allow_macro_instructions_); VIXL_ASSERT(OutsideITBlock()); MacroEmissionCheckScope guard(this); if (cond.Is(al) && rd.Is(rn) && operand.IsImmediate()) { uint32_t immediate = operand.GetImmediate(); if (immediate == 0) { return; } } bool can_use_it = // SUB