35 #ifndef V8_MIPS64_ASSEMBLER_MIPS64_H_ 36 #define V8_MIPS64_ASSEMBLER_MIPS64_H_ 42 #include "src/assembler.h" 43 #include "src/contexts.h" 44 #include "src/external-reference.h" 45 #include "src/label.h" 46 #include "src/mips64/constants-mips64.h" 47 #include "src/objects/smi.h" 53 #define GENERAL_REGISTERS(V) \ 54 V(zero_reg) V(at) V(v0) V(v1) V(a0) V(a1) V(a2) V(a3) \ 55 V(a4) V(a5) V(a6) V(a7) V(t0) V(t1) V(t2) V(t3) \ 56 V(s0) V(s1) V(s2) V(s3) V(s4) V(s5) V(s6) V(s7) V(t8) V(t9) \ 57 V(k0) V(k1) V(gp) V(sp) V(fp) V(ra) 59 #define ALLOCATABLE_GENERAL_REGISTERS(V) \ 60 V(a0) V(a1) V(a2) V(a3) \ 61 V(a4) V(a5) V(a6) V(a7) V(t0) V(t1) V(t2) V(s7) \ 64 #define DOUBLE_REGISTERS(V) \ 65 V(f0) V(f1) V(f2) V(f3) V(f4) V(f5) V(f6) V(f7) \ 66 V(f8) V(f9) V(f10) V(f11) V(f12) V(f13) V(f14) V(f15) \ 67 V(f16) V(f17) V(f18) V(f19) V(f20) V(f21) V(f22) V(f23) \ 68 V(f24) V(f25) V(f26) V(f27) V(f28) V(f29) V(f30) V(f31) 70 #define FLOAT_REGISTERS DOUBLE_REGISTERS 71 #define SIMD128_REGISTERS(V) \ 72 V(w0) V(w1) V(w2) V(w3) V(w4) V(w5) V(w6) V(w7) \ 73 V(w8) V(w9) V(w10) V(w11) V(w12) V(w13) V(w14) V(w15) \ 74 V(w16) V(w17) V(w18) V(w19) V(w20) V(w21) V(w22) V(w23) \ 75 V(w24) V(w25) V(w26) V(w27) V(w28) V(w29) V(w30) V(w31) 77 #define ALLOCATABLE_DOUBLE_REGISTERS(V) \ 78 V(f0) V(f2) V(f4) V(f6) V(f8) V(f10) V(f12) V(f14) \ 79 V(f16) V(f18) V(f20) V(f22) V(f24) V(f26) 84 const int kNumRegs = 32;
86 const RegList kJSCallerSaved = 1 << 2 |
101 const int kNumJSCallerSaved = 14;
104 const RegList kCalleeSaved = 1 << 16 |
114 const int kNumCalleeSaved = 9;
116 const RegList kCalleeSavedFPU = 1 << 20 |
123 const int kNumCalleeSavedFPU = 6;
125 const RegList kCallerSavedFPU = 1 << 0 |
138 const int kNumSafepointRegisters = 24;
143 const RegList kSafepointSavedRegisters = kJSCallerSaved | kCalleeSaved;
144 const int kNumSafepointSavedRegisters = kNumJSCallerSaved + kNumCalleeSaved;
146 const int kUndefIndex = -1;
148 const int kSafepointRegisterStackIndexMap[kNumRegs] = {kUndefIndex,
207 #define REGISTER_CODE(R) kRegCode_##R, 208 GENERAL_REGISTERS(REGISTER_CODE)
213 class Register :
public RegisterBase<Register, kRegAfterLast> {
215 #if defined(V8_TARGET_LITTLE_ENDIAN) 216 static constexpr
int kMantissaOffset = 0;
217 static constexpr
int kExponentOffset = 4;
218 #elif defined(V8_TARGET_BIG_ENDIAN) 219 static constexpr
int kMantissaOffset = 4;
220 static constexpr
int kExponentOffset = 0;
222 #error Unknown endianness 226 friend class RegisterBase;
227 explicit constexpr Register(
int code) : RegisterBase(code) {}
233 #define DECLARE_REGISTER(R) \ 234 constexpr Register R = Register::from_code<kRegCode_##R>(); 235 GENERAL_REGISTERS(DECLARE_REGISTER)
236 #undef DECLARE_REGISTER 238 constexpr Register no_reg = Register::no_reg();
240 int ToNumber(Register reg);
242 Register ToRegister(
int num);
244 constexpr
bool kPadArguments =
false;
245 constexpr
bool kSimpleFPAliasing =
true;
246 constexpr
bool kSimdMaskRegisters =
false;
248 enum DoubleRegisterCode {
249 #define REGISTER_CODE(R) kDoubleCode_##R, 250 DOUBLE_REGISTERS(REGISTER_CODE)
256 class FPURegister :
public RegisterBase<FPURegister, kDoubleAfterLast> {
262 FPURegister low()
const {
265 DCHECK_EQ(code() % 2, 0);
266 return FPURegister::from_code(code());
268 FPURegister high()
const {
271 DCHECK_EQ(code() % 2, 0);
272 return FPURegister::from_code(code() + 1);
276 friend class RegisterBase;
277 explicit constexpr FPURegister(
int code) : RegisterBase(code) {}
280 enum MSARegisterCode {
281 #define REGISTER_CODE(R) kMsaCode_##R, 282 SIMD128_REGISTERS(REGISTER_CODE)
288 class MSARegister :
public RegisterBase<MSARegister, kMsaAfterLast> {
289 friend class RegisterBase;
290 explicit constexpr MSARegister(
int code) : RegisterBase(code) {}
307 typedef FPURegister FloatRegister;
309 typedef FPURegister DoubleRegister;
311 #define DECLARE_DOUBLE_REGISTER(R) \ 312 constexpr DoubleRegister R = DoubleRegister::from_code<kDoubleCode_##R>(); 313 DOUBLE_REGISTERS(DECLARE_DOUBLE_REGISTER)
314 #undef DECLARE_DOUBLE_REGISTER 316 constexpr DoubleRegister no_dreg = DoubleRegister::no_reg();
319 typedef MSARegister Simd128Register;
321 #define DECLARE_SIMD128_REGISTER(R) \ 322 constexpr Simd128Register R = Simd128Register::from_code<kMsaCode_##R>(); 323 SIMD128_REGISTERS(DECLARE_SIMD128_REGISTER)
324 #undef DECLARE_SIMD128_REGISTER 326 const Simd128Register no_msareg = Simd128Register::no_reg();
330 constexpr Register kRootRegister = s6;
331 constexpr Register cp = s7;
332 constexpr Register kScratchReg = s3;
333 constexpr Register kScratchReg2 = s4;
334 constexpr DoubleRegister kScratchDoubleReg = f30;
335 constexpr DoubleRegister kDoubleRegZero = f28;
338 constexpr DoubleRegister kDoubleCompareReg = f23;
340 constexpr Simd128Register kSimd128RegZero = w28;
341 constexpr Simd128Register kSimd128ScratchReg = w30;
345 struct FPUControlRegister {
346 bool is_valid()
const {
return reg_code == kFCSRRegister; }
347 bool is(FPUControlRegister creg)
const {
return reg_code == creg.reg_code; }
354 return 1 << reg_code;
356 void setcode(
int f) {
364 constexpr FPUControlRegister no_fpucreg = {kInvalidFPUControlRegister};
365 constexpr FPUControlRegister FCSR = {kFCSRRegister};
368 struct MSAControlRegister {
369 bool is_valid()
const {
370 return (reg_code == kMSAIRRegister) || (reg_code == kMSACSRRegister);
372 bool is(MSAControlRegister creg)
const {
return reg_code == creg.reg_code; }
379 return 1 << reg_code;
381 void setcode(
int f) {
389 constexpr MSAControlRegister no_msacreg = {kInvalidMSAControlRegister};
390 constexpr MSAControlRegister MSAIR = {kMSAIRRegister};
391 constexpr MSAControlRegister MSACSR = {kMSACSRRegister};
395 constexpr
int kSmiShift = kSmiTagSize + kSmiShiftSize;
396 constexpr uint64_t kSmiShiftMask = (1UL << kSmiShift) - 1;
401 V8_INLINE
explicit Operand(
int64_t immediate,
402 RelocInfo::Mode rmode = RelocInfo::NONE)
403 : rm_(no_reg), rmode_(rmode) {
404 value_.immediate = immediate;
406 V8_INLINE
explicit Operand(
const ExternalReference& f)
407 : rm_(no_reg), rmode_(RelocInfo::EXTERNAL_REFERENCE) {
408 value_.immediate =
static_cast<int64_t>(f.address());
410 V8_INLINE
explicit Operand(
const char* s);
411 explicit Operand(Handle<HeapObject> handle);
412 V8_INLINE
explicit Operand(Smi value) : rm_(no_reg), rmode_(RelocInfo::NONE) {
413 value_.immediate =
static_cast<intptr_t
>(value.ptr());
416 static Operand EmbeddedNumber(
double number);
417 static Operand EmbeddedCode(CodeStub* stub);
418 static Operand EmbeddedStringConstant(
const StringConstantBase* str);
421 V8_INLINE
explicit Operand(Register rm) : rm_(rm) {}
424 V8_INLINE
bool is_reg()
const;
426 inline int64_t immediate()
const;
428 bool IsImmediate()
const {
return !rm_.is_valid(); }
430 HeapObjectRequest heap_object_request()
const {
431 DCHECK(IsHeapObjectRequest());
432 return value_.heap_object_request;
435 bool IsHeapObjectRequest()
const {
436 DCHECK_IMPLIES(is_heap_object_request_, IsImmediate());
437 DCHECK_IMPLIES(is_heap_object_request_,
438 rmode_ == RelocInfo::EMBEDDED_OBJECT ||
439 rmode_ == RelocInfo::CODE_TARGET);
440 return is_heap_object_request_;
443 Register rm()
const {
return rm_; }
445 RelocInfo::Mode rmode()
const {
return rmode_; }
451 HeapObjectRequest heap_object_request;
454 bool is_heap_object_request_ =
false;
455 RelocInfo::Mode rmode_;
457 friend class Assembler;
458 friend class MacroAssembler;
464 class MemOperand :
public Operand {
468 offset_minus_one = -1,
472 explicit MemOperand(Register rn, int32_t offset = 0);
473 explicit MemOperand(Register rn, int32_t unit, int32_t multiplier,
474 OffsetAddend offset_addend = offset_zero);
475 int32_t offset()
const {
return offset_; }
477 bool OffsetIsInt16Encodable()
const {
478 return is_int16(offset_);
484 friend class Assembler;
487 class V8_EXPORT_PRIVATE Assembler :
public AssemblerBase {
503 Assembler(
const AssemblerOptions& options,
void* buffer,
int buffer_size);
504 virtual ~Assembler() { }
509 void GetCode(Isolate* isolate, CodeDesc* desc);
527 enum OffsetSize :
int { kOffset26 = 26, kOffset21 = 21, kOffset16 = 16 };
531 bool is_near(Label* L);
532 bool is_near(Label* L, OffsetSize bits);
533 bool is_near_branch(Label* L);
534 inline bool is_near_pre_r6(Label* L) {
535 DCHECK(!(kArchVariant == kMips64r6));
536 return pc_offset() - L->pos() < kMaxBranchOffset - 4 * kInstrSize;
538 inline bool is_near_r6(Label* L) {
539 DCHECK_EQ(kArchVariant, kMips64r6);
540 return pc_offset() - L->pos() < kMaxCompactBranchOffset - 4 * kInstrSize;
543 int BranchOffset(Instr instr);
548 int32_t branch_offset_helper(Label* L, OffsetSize bits);
549 inline int32_t branch_offset(Label* L) {
550 return branch_offset_helper(L, OffsetSize::kOffset16);
552 inline int32_t branch_offset21(Label* L) {
553 return branch_offset_helper(L, OffsetSize::kOffset21);
555 inline int32_t branch_offset26(Label* L) {
556 return branch_offset_helper(L, OffsetSize::kOffset26);
558 inline int32_t shifted_branch_offset(Label* L) {
559 return branch_offset(L) >> 2;
561 inline int32_t shifted_branch_offset21(Label* L) {
562 return branch_offset21(L) >> 2;
564 inline int32_t shifted_branch_offset26(Label* L) {
565 return branch_offset26(L) >> 2;
567 uint64_t jump_address(Label* L);
568 uint64_t jump_offset(Label* L);
569 uint64_t branch_long_offset(Label* L);
573 void label_at_put(Label* L,
int at_offset);
577 static Address target_address_at(Address pc);
578 V8_INLINE
static void set_target_address_at(
579 Address pc, Address target,
580 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED) {
581 set_target_value_at(pc, target, icache_flush_mode);
584 V8_INLINE
static Address target_address_at(Address pc,
585 Address constant_pool) {
586 return target_address_at(pc);
588 V8_INLINE
static void set_target_address_at(
589 Address pc, Address constant_pool, Address target,
590 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED) {
591 set_target_address_at(pc, target, icache_flush_mode);
594 static void set_target_value_at(
595 Address pc, uint64_t target,
596 ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED);
600 inline static Address target_address_from_return_address(Address pc);
602 static void JumpLabelToJumpRegister(Address pc);
604 static void QuietNaN(HeapObject* nan);
609 inline static void deserialization_set_special_target_at(
610 Address instruction_payload, Code code, Address target);
613 inline static int deserialization_special_target_size(
614 Address instruction_payload);
617 inline static void deserialization_set_target_internal_reference_at(
618 Address pc, Address target,
619 RelocInfo::Mode mode = RelocInfo::INTERNAL_REFERENCE);
622 static constexpr
int kBranchPCOffset = kInstrSize;
627 static constexpr
int kLongBranchPCOffset = 3 * kInstrSize;
633 static constexpr
int kOptimizedBranchAndLinkLongReturnOffset = 4 * kInstrSize;
641 static constexpr
int kSpecialTargetSize = 0;
647 static constexpr
int kInstructionsFor32BitConstant = 2;
648 static constexpr
int kInstructionsFor64BitConstant = 4;
652 #ifdef _MIPS_ARCH_MIPS64R6 653 static constexpr
int kCallTargetAddressOffset = 5 * kInstrSize;
655 static constexpr
int kCallTargetAddressOffset = 6 * kInstrSize;
660 static constexpr
int kPcLoadDelta = 4;
663 static constexpr
int kMaxBranchOffset = (1 << (18 - 1)) - 1;
666 static constexpr
int kMaxCompactBranchOffset = (1 << (28 - 1)) - 1;
668 static constexpr
int kTrampolineSlotsSize =
669 kArchVariant == kMips64r6 ? 2 * kInstrSize : 7 * kInstrSize;
671 RegList* GetScratchRegisterList() {
return &scratch_register_list_; }
682 void DataAlign(
int m);
684 void CodeTargetAlign();
688 enum NopMarkerTypes {
692 PROPERTY_ACCESS_INLINED,
693 PROPERTY_ACCESS_INLINED_CONTEXT,
694 PROPERTY_ACCESS_INLINED_CONTEXT_DONT_DELETE,
697 FIRST_IC_MARKER = PROPERTY_ACCESS_INLINED,
703 void nop(
unsigned int type = 0) {
705 Register nop_rt_reg = (type == 0) ? zero_reg : at;
706 sll(zero_reg, nop_rt_reg, type,
true);
712 void b(int16_t offset);
713 inline void b(Label* L) { b(shifted_branch_offset(L)); }
714 void bal(int16_t offset);
715 inline void bal(Label* L) { bal(shifted_branch_offset(L)); }
716 void bc(int32_t offset);
717 inline void bc(Label* L) { bc(shifted_branch_offset26(L)); }
718 void balc(int32_t offset);
719 inline void balc(Label* L) { balc(shifted_branch_offset26(L)); }
721 void beq(Register rs, Register rt, int16_t offset);
722 inline void beq(Register rs, Register rt, Label* L) {
723 beq(rs, rt, shifted_branch_offset(L));
725 void bgez(Register rs, int16_t offset);
726 void bgezc(Register rt, int16_t offset);
727 inline void bgezc(Register rt, Label* L) {
728 bgezc(rt, shifted_branch_offset(L));
730 void bgeuc(Register rs, Register rt, int16_t offset);
731 inline void bgeuc(Register rs, Register rt, Label* L) {
732 bgeuc(rs, rt, shifted_branch_offset(L));
734 void bgec(Register rs, Register rt, int16_t offset);
735 inline void bgec(Register rs, Register rt, Label* L) {
736 bgec(rs, rt, shifted_branch_offset(L));
738 void bgezal(Register rs, int16_t offset);
739 void bgezalc(Register rt, int16_t offset);
740 inline void bgezalc(Register rt, Label* L) {
741 bgezalc(rt, shifted_branch_offset(L));
743 void bgezall(Register rs, int16_t offset);
744 inline void bgezall(Register rs, Label* L) {
745 bgezall(rs, branch_offset(L) >> 2);
747 void bgtz(Register rs, int16_t offset);
748 void bgtzc(Register rt, int16_t offset);
749 inline void bgtzc(Register rt, Label* L) {
750 bgtzc(rt, shifted_branch_offset(L));
752 void blez(Register rs, int16_t offset);
753 void blezc(Register rt, int16_t offset);
754 inline void blezc(Register rt, Label* L) {
755 blezc(rt, shifted_branch_offset(L));
757 void bltz(Register rs, int16_t offset);
758 void bltzc(Register rt, int16_t offset);
759 inline void bltzc(Register rt, Label* L) {
760 bltzc(rt, shifted_branch_offset(L));
762 void bltuc(Register rs, Register rt, int16_t offset);
763 inline void bltuc(Register rs, Register rt, Label* L) {
764 bltuc(rs, rt, shifted_branch_offset(L));
766 void bltc(Register rs, Register rt, int16_t offset);
767 inline void bltc(Register rs, Register rt, Label* L) {
768 bltc(rs, rt, shifted_branch_offset(L));
770 void bltzal(Register rs, int16_t offset);
771 void nal() { bltzal(zero_reg, 0); }
772 void blezalc(Register rt, int16_t offset);
773 inline void blezalc(Register rt, Label* L) {
774 blezalc(rt, shifted_branch_offset(L));
776 void bltzalc(Register rt, int16_t offset);
777 inline void bltzalc(Register rt, Label* L) {
778 bltzalc(rt, shifted_branch_offset(L));
780 void bgtzalc(Register rt, int16_t offset);
781 inline void bgtzalc(Register rt, Label* L) {
782 bgtzalc(rt, shifted_branch_offset(L));
784 void beqzalc(Register rt, int16_t offset);
785 inline void beqzalc(Register rt, Label* L) {
786 beqzalc(rt, shifted_branch_offset(L));
788 void beqc(Register rs, Register rt, int16_t offset);
789 inline void beqc(Register rs, Register rt, Label* L) {
790 beqc(rs, rt, shifted_branch_offset(L));
792 void beqzc(Register rs, int32_t offset);
793 inline void beqzc(Register rs, Label* L) {
794 beqzc(rs, shifted_branch_offset21(L));
796 void bnezalc(Register rt, int16_t offset);
797 inline void bnezalc(Register rt, Label* L) {
798 bnezalc(rt, shifted_branch_offset(L));
800 void bnec(Register rs, Register rt, int16_t offset);
801 inline void bnec(Register rs, Register rt, Label* L) {
802 bnec(rs, rt, shifted_branch_offset(L));
804 void bnezc(Register rt, int32_t offset);
805 inline void bnezc(Register rt, Label* L) {
806 bnezc(rt, shifted_branch_offset21(L));
808 void bne(Register rs, Register rt, int16_t offset);
809 inline void bne(Register rs, Register rt, Label* L) {
810 bne(rs, rt, shifted_branch_offset(L));
812 void bovc(Register rs, Register rt, int16_t offset);
813 inline void bovc(Register rs, Register rt, Label* L) {
814 bovc(rs, rt, shifted_branch_offset(L));
816 void bnvc(Register rs, Register rt, int16_t offset);
817 inline void bnvc(Register rs, Register rt, Label* L) {
818 bnvc(rs, rt, shifted_branch_offset(L));
824 void jalr(Register rs, Register rd = ra);
825 void jr(Register target);
826 void jic(Register rt, int16_t offset);
827 void jialc(Register rt, int16_t offset);
833 void j(Label* target);
834 void jal(Label* target);
839 void addu(Register rd, Register rs, Register rt);
840 void subu(Register rd, Register rs, Register rt);
842 void div(Register rs, Register rt);
843 void divu(Register rs, Register rt);
844 void ddiv(Register rs, Register rt);
845 void ddivu(Register rs, Register rt);
846 void div(Register rd, Register rs, Register rt);
847 void divu(Register rd, Register rs, Register rt);
848 void ddiv(Register rd, Register rs, Register rt);
849 void ddivu(Register rd, Register rs, Register rt);
850 void mod(Register rd, Register rs, Register rt);
851 void modu(Register rd, Register rs, Register rt);
852 void dmod(Register rd, Register rs, Register rt);
853 void dmodu(Register rd, Register rs, Register rt);
855 void mul(Register rd, Register rs, Register rt);
856 void muh(Register rd, Register rs, Register rt);
857 void mulu(Register rd, Register rs, Register rt);
858 void muhu(Register rd, Register rs, Register rt);
859 void mult(Register rs, Register rt);
860 void multu(Register rs, Register rt);
861 void dmul(Register rd, Register rs, Register rt);
862 void dmuh(Register rd, Register rs, Register rt);
863 void dmulu(Register rd, Register rs, Register rt);
864 void dmuhu(Register rd, Register rs, Register rt);
865 void daddu(Register rd, Register rs, Register rt);
866 void dsubu(Register rd, Register rs, Register rt);
867 void dmult(Register rs, Register rt);
868 void dmultu(Register rs, Register rt);
870 void addiu(Register rd, Register rs, int32_t j);
871 void daddiu(Register rd, Register rs, int32_t j);
874 void and_(Register rd, Register rs, Register rt);
875 void or_(Register rd, Register rs, Register rt);
876 void xor_(Register rd, Register rs, Register rt);
877 void nor(Register rd, Register rs, Register rt);
879 void andi(Register rd, Register rs, int32_t j);
880 void ori(Register rd, Register rs, int32_t j);
881 void xori(Register rd, Register rs, int32_t j);
882 void lui(Register rd, int32_t j);
883 void aui(Register rt, Register rs, int32_t j);
884 void daui(Register rt, Register rs, int32_t j);
885 void dahi(Register rs, int32_t j);
886 void dati(Register rs, int32_t j);
892 void sll(Register rd, Register rt, uint16_t sa,
bool coming_from_nop =
false);
893 void sllv(Register rd, Register rt, Register rs);
894 void srl(Register rd, Register rt, uint16_t sa);
895 void srlv(Register rd, Register rt, Register rs);
896 void sra(Register rt, Register rd, uint16_t sa);
897 void srav(Register rt, Register rd, Register rs);
898 void rotr(Register rd, Register rt, uint16_t sa);
899 void rotrv(Register rd, Register rt, Register rs);
900 void dsll(Register rd, Register rt, uint16_t sa);
901 void dsllv(Register rd, Register rt, Register rs);
902 void dsrl(Register rd, Register rt, uint16_t sa);
903 void dsrlv(Register rd, Register rt, Register rs);
904 void drotr(Register rd, Register rt, uint16_t sa);
905 void drotr32(Register rd, Register rt, uint16_t sa);
906 void drotrv(Register rd, Register rt, Register rs);
907 void dsra(Register rt, Register rd, uint16_t sa);
908 void dsrav(Register rd, Register rt, Register rs);
909 void dsll32(Register rt, Register rd, uint16_t sa);
910 void dsrl32(Register rt, Register rd, uint16_t sa);
911 void dsra32(Register rt, Register rd, uint16_t sa);
915 void lb(Register rd,
const MemOperand& rs);
916 void lbu(Register rd,
const MemOperand& rs);
917 void lh(Register rd,
const MemOperand& rs);
918 void lhu(Register rd,
const MemOperand& rs);
919 void lw(Register rd,
const MemOperand& rs);
920 void lwu(Register rd,
const MemOperand& rs);
921 void lwl(Register rd,
const MemOperand& rs);
922 void lwr(Register rd,
const MemOperand& rs);
923 void sb(Register rd,
const MemOperand& rs);
924 void sh(Register rd,
const MemOperand& rs);
925 void sw(Register rd,
const MemOperand& rs);
926 void swl(Register rd,
const MemOperand& rs);
927 void swr(Register rd,
const MemOperand& rs);
928 void ldl(Register rd,
const MemOperand& rs);
929 void ldr(Register rd,
const MemOperand& rs);
930 void sdl(Register rd,
const MemOperand& rs);
931 void sdr(Register rd,
const MemOperand& rs);
932 void ld(Register rd,
const MemOperand& rs);
933 void sd(Register rd,
const MemOperand& rs);
937 void ll(Register rd,
const MemOperand& rs);
938 void sc(Register rd,
const MemOperand& rs);
939 void lld(Register rd,
const MemOperand& rs);
940 void scd(Register rd,
const MemOperand& rs);
944 void addiupc(Register rs, int32_t imm19);
945 void lwpc(Register rs, int32_t offset19);
946 void lwupc(Register rs, int32_t offset19);
947 void ldpc(Register rs, int32_t offset18);
948 void auipc(Register rs, int16_t imm16);
949 void aluipc(Register rs, int16_t imm16);
954 void pref(int32_t hint,
const MemOperand& rs);
960 void break_(
uint32_t code,
bool break_as_stop =
false);
961 void stop(
const char* msg,
uint32_t code = kMaxStopCode);
962 void tge(Register rs, Register rt, uint16_t code);
963 void tgeu(Register rs, Register rt, uint16_t code);
964 void tlt(Register rs, Register rt, uint16_t code);
965 void tltu(Register rs, Register rt, uint16_t code);
966 void teq(Register rs, Register rt, uint16_t code);
967 void tne(Register rs, Register rt, uint16_t code);
973 void mfhi(Register rd);
974 void mflo(Register rd);
977 void slt(Register rd, Register rs, Register rt);
978 void sltu(Register rd, Register rs, Register rt);
979 void slti(Register rd, Register rs, int32_t j);
980 void sltiu(Register rd, Register rs, int32_t j);
983 void movz(Register rd, Register rs, Register rt);
984 void movn(Register rd, Register rs, Register rt);
985 void movt(Register rd, Register rs, uint16_t cc = 0);
986 void movf(Register rd, Register rs, uint16_t cc = 0);
988 void sel(SecondaryField fmt, FPURegister fd, FPURegister fs, FPURegister ft);
989 void sel_s(FPURegister fd, FPURegister fs, FPURegister ft);
990 void sel_d(FPURegister fd, FPURegister fs, FPURegister ft);
991 void seleqz(Register rd, Register rs, Register rt);
992 void seleqz(SecondaryField fmt, FPURegister fd, FPURegister fs,
994 void selnez(Register rs, Register rt, Register rd);
995 void selnez(SecondaryField fmt, FPURegister fd, FPURegister fs,
997 void seleqz_d(FPURegister fd, FPURegister fs, FPURegister ft);
998 void seleqz_s(FPURegister fd, FPURegister fs, FPURegister ft);
999 void selnez_d(FPURegister fd, FPURegister fs, FPURegister ft);
1000 void selnez_s(FPURegister fd, FPURegister fs, FPURegister ft);
1002 void movz_s(FPURegister fd, FPURegister fs, Register rt);
1003 void movz_d(FPURegister fd, FPURegister fs, Register rt);
1004 void movt_s(FPURegister fd, FPURegister fs, uint16_t cc = 0);
1005 void movt_d(FPURegister fd, FPURegister fs, uint16_t cc = 0);
1006 void movf_s(FPURegister fd, FPURegister fs, uint16_t cc = 0);
1007 void movf_d(FPURegister fd, FPURegister fs, uint16_t cc = 0);
1008 void movn_s(FPURegister fd, FPURegister fs, Register rt);
1009 void movn_d(FPURegister fd, FPURegister fs, Register rt);
1011 void clz(Register rd, Register rs);
1012 void dclz(Register rd, Register rs);
1013 void ins_(Register rt, Register rs, uint16_t pos, uint16_t size);
1014 void ext_(Register rt, Register rs, uint16_t pos, uint16_t size);
1015 void dext_(Register rt, Register rs, uint16_t pos, uint16_t size);
1016 void dextm_(Register rt, Register rs, uint16_t pos, uint16_t size);
1017 void dextu_(Register rt, Register rs, uint16_t pos, uint16_t size);
1018 void dins_(Register rt, Register rs, uint16_t pos, uint16_t size);
1019 void dinsm_(Register rt, Register rs, uint16_t pos, uint16_t size);
1020 void dinsu_(Register rt, Register rs, uint16_t pos, uint16_t size);
1021 void bitswap(Register rd, Register rt);
1022 void dbitswap(Register rd, Register rt);
1023 void align(Register rd, Register rs, Register rt, uint8_t bp);
1024 void dalign(Register rd, Register rs, Register rt, uint8_t bp);
1026 void wsbh(Register rd, Register rt);
1027 void dsbh(Register rd, Register rt);
1028 void dshd(Register rd, Register rt);
1029 void seh(Register rd, Register rt);
1030 void seb(Register rd, Register rt);
1035 void lwc1(FPURegister fd,
const MemOperand& src);
1036 void ldc1(FPURegister fd,
const MemOperand& src);
1038 void swc1(FPURegister fs,
const MemOperand& dst);
1039 void sdc1(FPURegister fs,
const MemOperand& dst);
1041 void mtc1(Register rt, FPURegister fs);
1042 void mthc1(Register rt, FPURegister fs);
1043 void dmtc1(Register rt, FPURegister fs);
1045 void mfc1(Register rt, FPURegister fs);
1046 void mfhc1(Register rt, FPURegister fs);
1047 void dmfc1(Register rt, FPURegister fs);
1049 void ctc1(Register rt, FPUControlRegister fs);
1050 void cfc1(Register rt, FPUControlRegister fs);
1053 void add_s(FPURegister fd, FPURegister fs, FPURegister ft);
1054 void add_d(FPURegister fd, FPURegister fs, FPURegister ft);
1055 void sub_s(FPURegister fd, FPURegister fs, FPURegister ft);
1056 void sub_d(FPURegister fd, FPURegister fs, FPURegister ft);
1057 void mul_s(FPURegister fd, FPURegister fs, FPURegister ft);
1058 void mul_d(FPURegister fd, FPURegister fs, FPURegister ft);
1059 void madd_s(FPURegister fd, FPURegister fr, FPURegister fs, FPURegister ft);
1060 void madd_d(FPURegister fd, FPURegister fr, FPURegister fs, FPURegister ft);
1061 void msub_s(FPURegister fd, FPURegister fr, FPURegister fs, FPURegister ft);
1062 void msub_d(FPURegister fd, FPURegister fr, FPURegister fs, FPURegister ft);
1063 void maddf_s(FPURegister fd, FPURegister fs, FPURegister ft);
1064 void maddf_d(FPURegister fd, FPURegister fs, FPURegister ft);
1065 void msubf_s(FPURegister fd, FPURegister fs, FPURegister ft);
1066 void msubf_d(FPURegister fd, FPURegister fs, FPURegister ft);
1067 void div_s(FPURegister fd, FPURegister fs, FPURegister ft);
1068 void div_d(FPURegister fd, FPURegister fs, FPURegister ft);
1069 void abs_s(FPURegister fd, FPURegister fs);
1070 void abs_d(FPURegister fd, FPURegister fs);
1071 void mov_d(FPURegister fd, FPURegister fs);
1072 void mov_s(FPURegister fd, FPURegister fs);
1073 void neg_s(FPURegister fd, FPURegister fs);
1074 void neg_d(FPURegister fd, FPURegister fs);
1075 void sqrt_s(FPURegister fd, FPURegister fs);
1076 void sqrt_d(FPURegister fd, FPURegister fs);
1077 void rsqrt_s(FPURegister fd, FPURegister fs);
1078 void rsqrt_d(FPURegister fd, FPURegister fs);
1079 void recip_d(FPURegister fd, FPURegister fs);
1080 void recip_s(FPURegister fd, FPURegister fs);
1083 void cvt_w_s(FPURegister fd, FPURegister fs);
1084 void cvt_w_d(FPURegister fd, FPURegister fs);
1085 void trunc_w_s(FPURegister fd, FPURegister fs);
1086 void trunc_w_d(FPURegister fd, FPURegister fs);
1087 void round_w_s(FPURegister fd, FPURegister fs);
1088 void round_w_d(FPURegister fd, FPURegister fs);
1089 void floor_w_s(FPURegister fd, FPURegister fs);
1090 void floor_w_d(FPURegister fd, FPURegister fs);
1091 void ceil_w_s(FPURegister fd, FPURegister fs);
1092 void ceil_w_d(FPURegister fd, FPURegister fs);
1093 void rint_s(FPURegister fd, FPURegister fs);
1094 void rint_d(FPURegister fd, FPURegister fs);
1095 void rint(SecondaryField fmt, FPURegister fd, FPURegister fs);
1098 void cvt_l_s(FPURegister fd, FPURegister fs);
1099 void cvt_l_d(FPURegister fd, FPURegister fs);
1100 void trunc_l_s(FPURegister fd, FPURegister fs);
1101 void trunc_l_d(FPURegister fd, FPURegister fs);
1102 void round_l_s(FPURegister fd, FPURegister fs);
1103 void round_l_d(FPURegister fd, FPURegister fs);
1104 void floor_l_s(FPURegister fd, FPURegister fs);
1105 void floor_l_d(FPURegister fd, FPURegister fs);
1106 void ceil_l_s(FPURegister fd, FPURegister fs);
1107 void ceil_l_d(FPURegister fd, FPURegister fs);
1109 void class_s(FPURegister fd, FPURegister fs);
1110 void class_d(FPURegister fd, FPURegister fs);
1112 void min(SecondaryField fmt, FPURegister fd, FPURegister fs, FPURegister ft);
1113 void mina(SecondaryField fmt, FPURegister fd, FPURegister fs, FPURegister ft);
1114 void max(SecondaryField fmt, FPURegister fd, FPURegister fs, FPURegister ft);
1115 void maxa(SecondaryField fmt, FPURegister fd, FPURegister fs, FPURegister ft);
1116 void min_s(FPURegister fd, FPURegister fs, FPURegister ft);
1117 void min_d(FPURegister fd, FPURegister fs, FPURegister ft);
1118 void max_s(FPURegister fd, FPURegister fs, FPURegister ft);
1119 void max_d(FPURegister fd, FPURegister fs, FPURegister ft);
1120 void mina_s(FPURegister fd, FPURegister fs, FPURegister ft);
1121 void mina_d(FPURegister fd, FPURegister fs, FPURegister ft);
1122 void maxa_s(FPURegister fd, FPURegister fs, FPURegister ft);
1123 void maxa_d(FPURegister fd, FPURegister fs, FPURegister ft);
1125 void cvt_s_w(FPURegister fd, FPURegister fs);
1126 void cvt_s_l(FPURegister fd, FPURegister fs);
1127 void cvt_s_d(FPURegister fd, FPURegister fs);
1129 void cvt_d_w(FPURegister fd, FPURegister fs);
1130 void cvt_d_l(FPURegister fd, FPURegister fs);
1131 void cvt_d_s(FPURegister fd, FPURegister fs);
1134 void cmp(FPUCondition cond, SecondaryField fmt,
1135 FPURegister fd, FPURegister ft, FPURegister fs);
1136 void cmp_s(FPUCondition cond, FPURegister fd, FPURegister fs, FPURegister ft);
1137 void cmp_d(FPUCondition cond, FPURegister fd, FPURegister fs, FPURegister ft);
1139 void bc1eqz(int16_t offset, FPURegister ft);
1140 inline void bc1eqz(Label* L, FPURegister ft) {
1141 bc1eqz(shifted_branch_offset(L), ft);
1143 void bc1nez(int16_t offset, FPURegister ft);
1144 inline void bc1nez(Label* L, FPURegister ft) {
1145 bc1nez(shifted_branch_offset(L), ft);
1149 void c(FPUCondition cond, SecondaryField fmt,
1150 FPURegister ft, FPURegister fs, uint16_t cc = 0);
1151 void c_s(FPUCondition cond, FPURegister ft, FPURegister fs, uint16_t cc = 0);
1152 void c_d(FPUCondition cond, FPURegister ft, FPURegister fs, uint16_t cc = 0);
1154 void bc1f(int16_t offset, uint16_t cc = 0);
1155 inline void bc1f(Label* L, uint16_t cc = 0) {
1156 bc1f(shifted_branch_offset(L), cc);
1158 void bc1t(int16_t offset, uint16_t cc = 0);
1159 inline void bc1t(Label* L, uint16_t cc = 0) {
1160 bc1t(shifted_branch_offset(L), cc);
1162 void fcmp(FPURegister src1,
const double src2, FPUCondition cond);
1165 void bz_v(MSARegister wt, int16_t offset);
1166 inline void bz_v(MSARegister wt, Label* L) {
1167 bz_v(wt, shifted_branch_offset(L));
1169 void bz_b(MSARegister wt, int16_t offset);
1170 inline void bz_b(MSARegister wt, Label* L) {
1171 bz_b(wt, shifted_branch_offset(L));
1173 void bz_h(MSARegister wt, int16_t offset);
1174 inline void bz_h(MSARegister wt, Label* L) {
1175 bz_h(wt, shifted_branch_offset(L));
1177 void bz_w(MSARegister wt, int16_t offset);
1178 inline void bz_w(MSARegister wt, Label* L) {
1179 bz_w(wt, shifted_branch_offset(L));
1181 void bz_d(MSARegister wt, int16_t offset);
1182 inline void bz_d(MSARegister wt, Label* L) {
1183 bz_d(wt, shifted_branch_offset(L));
1185 void bnz_v(MSARegister wt, int16_t offset);
1186 inline void bnz_v(MSARegister wt, Label* L) {
1187 bnz_v(wt, shifted_branch_offset(L));
1189 void bnz_b(MSARegister wt, int16_t offset);
1190 inline void bnz_b(MSARegister wt, Label* L) {
1191 bnz_b(wt, shifted_branch_offset(L));
1193 void bnz_h(MSARegister wt, int16_t offset);
1194 inline void bnz_h(MSARegister wt, Label* L) {
1195 bnz_h(wt, shifted_branch_offset(L));
1197 void bnz_w(MSARegister wt, int16_t offset);
1198 inline void bnz_w(MSARegister wt, Label* L) {
1199 bnz_w(wt, shifted_branch_offset(L));
1201 void bnz_d(MSARegister wt, int16_t offset);
1202 inline void bnz_d(MSARegister wt, Label* L) {
1203 bnz_d(wt, shifted_branch_offset(L));
1206 void ld_b(MSARegister wd,
const MemOperand& rs);
1207 void ld_h(MSARegister wd,
const MemOperand& rs);
1208 void ld_w(MSARegister wd,
const MemOperand& rs);
1209 void ld_d(MSARegister wd,
const MemOperand& rs);
1210 void st_b(MSARegister wd,
const MemOperand& rs);
1211 void st_h(MSARegister wd,
const MemOperand& rs);
1212 void st_w(MSARegister wd,
const MemOperand& rs);
1213 void st_d(MSARegister wd,
const MemOperand& rs);
1215 void ldi_b(MSARegister wd, int32_t imm10);
1216 void ldi_h(MSARegister wd, int32_t imm10);
1217 void ldi_w(MSARegister wd, int32_t imm10);
1218 void ldi_d(MSARegister wd, int32_t imm10);
1220 void addvi_b(MSARegister wd, MSARegister ws,
uint32_t imm5);
1221 void addvi_h(MSARegister wd, MSARegister ws,
uint32_t imm5);
1222 void addvi_w(MSARegister wd, MSARegister ws,
uint32_t imm5);
1223 void addvi_d(MSARegister wd, MSARegister ws,
uint32_t imm5);
1224 void subvi_b(MSARegister wd, MSARegister ws,
uint32_t imm5);
1225 void subvi_h(MSARegister wd, MSARegister ws,
uint32_t imm5);
1226 void subvi_w(MSARegister wd, MSARegister ws,
uint32_t imm5);
1227 void subvi_d(MSARegister wd, MSARegister ws,
uint32_t imm5);
1228 void maxi_s_b(MSARegister wd, MSARegister ws,
uint32_t imm5);
1229 void maxi_s_h(MSARegister wd, MSARegister ws,
uint32_t imm5);
1230 void maxi_s_w(MSARegister wd, MSARegister ws,
uint32_t imm5);
1231 void maxi_s_d(MSARegister wd, MSARegister ws,
uint32_t imm5);
1232 void maxi_u_b(MSARegister wd, MSARegister ws,
uint32_t imm5);
1233 void maxi_u_h(MSARegister wd, MSARegister ws,
uint32_t imm5);
1234 void maxi_u_w(MSARegister wd, MSARegister ws,
uint32_t imm5);
1235 void maxi_u_d(MSARegister wd, MSARegister ws,
uint32_t imm5);
1236 void mini_s_b(MSARegister wd, MSARegister ws,
uint32_t imm5);
1237 void mini_s_h(MSARegister wd, MSARegister ws,
uint32_t imm5);
1238 void mini_s_w(MSARegister wd, MSARegister ws,
uint32_t imm5);
1239 void mini_s_d(MSARegister wd, MSARegister ws,
uint32_t imm5);
1240 void mini_u_b(MSARegister wd, MSARegister ws,
uint32_t imm5);
1241 void mini_u_h(MSARegister wd, MSARegister ws,
uint32_t imm5);
1242 void mini_u_w(MSARegister wd, MSARegister ws,
uint32_t imm5);
1243 void mini_u_d(MSARegister wd, MSARegister ws,
uint32_t imm5);
1244 void ceqi_b(MSARegister wd, MSARegister ws,
uint32_t imm5);
1245 void ceqi_h(MSARegister wd, MSARegister ws,
uint32_t imm5);
1246 void ceqi_w(MSARegister wd, MSARegister ws,
uint32_t imm5);
1247 void ceqi_d(MSARegister wd, MSARegister ws,
uint32_t imm5);
1248 void clti_s_b(MSARegister wd, MSARegister ws,
uint32_t imm5);
1249 void clti_s_h(MSARegister wd, MSARegister ws,
uint32_t imm5);
1250 void clti_s_w(MSARegister wd, MSARegister ws,
uint32_t imm5);
1251 void clti_s_d(MSARegister wd, MSARegister ws,
uint32_t imm5);
1252 void clti_u_b(MSARegister wd, MSARegister ws,
uint32_t imm5);
1253 void clti_u_h(MSARegister wd, MSARegister ws,
uint32_t imm5);
1254 void clti_u_w(MSARegister wd, MSARegister ws,
uint32_t imm5);
1255 void clti_u_d(MSARegister wd, MSARegister ws,
uint32_t imm5);
1256 void clei_s_b(MSARegister wd, MSARegister ws,
uint32_t imm5);
1257 void clei_s_h(MSARegister wd, MSARegister ws,
uint32_t imm5);
1258 void clei_s_w(MSARegister wd, MSARegister ws,
uint32_t imm5);
1259 void clei_s_d(MSARegister wd, MSARegister ws,
uint32_t imm5);
1260 void clei_u_b(MSARegister wd, MSARegister ws,
uint32_t imm5);
1261 void clei_u_h(MSARegister wd, MSARegister ws,
uint32_t imm5);
1262 void clei_u_w(MSARegister wd, MSARegister ws,
uint32_t imm5);
1263 void clei_u_d(MSARegister wd, MSARegister ws,
uint32_t imm5);
1265 void andi_b(MSARegister wd, MSARegister ws,
uint32_t imm8);
1266 void ori_b(MSARegister wd, MSARegister ws,
uint32_t imm8);
1267 void nori_b(MSARegister wd, MSARegister ws,
uint32_t imm8);
1268 void xori_b(MSARegister wd, MSARegister ws,
uint32_t imm8);
1269 void bmnzi_b(MSARegister wd, MSARegister ws,
uint32_t imm8);
1270 void bmzi_b(MSARegister wd, MSARegister ws,
uint32_t imm8);
1271 void bseli_b(MSARegister wd, MSARegister ws,
uint32_t imm8);
1272 void shf_b(MSARegister wd, MSARegister ws,
uint32_t imm8);
1273 void shf_h(MSARegister wd, MSARegister ws,
uint32_t imm8);
1274 void shf_w(MSARegister wd, MSARegister ws,
uint32_t imm8);
1276 void and_v(MSARegister wd, MSARegister ws, MSARegister wt);
1277 void or_v(MSARegister wd, MSARegister ws, MSARegister wt);
1278 void nor_v(MSARegister wd, MSARegister ws, MSARegister wt);
1279 void xor_v(MSARegister wd, MSARegister ws, MSARegister wt);
1280 void bmnz_v(MSARegister wd, MSARegister ws, MSARegister wt);
1281 void bmz_v(MSARegister wd, MSARegister ws, MSARegister wt);
1282 void bsel_v(MSARegister wd, MSARegister ws, MSARegister wt);
1284 void fill_b(MSARegister wd, Register rs);
1285 void fill_h(MSARegister wd, Register rs);
1286 void fill_w(MSARegister wd, Register rs);
1287 void fill_d(MSARegister wd, Register rs);
1288 void pcnt_b(MSARegister wd, MSARegister ws);
1289 void pcnt_h(MSARegister wd, MSARegister ws);
1290 void pcnt_w(MSARegister wd, MSARegister ws);
1291 void pcnt_d(MSARegister wd, MSARegister ws);
1292 void nloc_b(MSARegister wd, MSARegister ws);
1293 void nloc_h(MSARegister wd, MSARegister ws);
1294 void nloc_w(MSARegister wd, MSARegister ws);
1295 void nloc_d(MSARegister wd, MSARegister ws);
1296 void nlzc_b(MSARegister wd, MSARegister ws);
1297 void nlzc_h(MSARegister wd, MSARegister ws);
1298 void nlzc_w(MSARegister wd, MSARegister ws);
1299 void nlzc_d(MSARegister wd, MSARegister ws);
1301 void fclass_w(MSARegister wd, MSARegister ws);
1302 void fclass_d(MSARegister wd, MSARegister ws);
1303 void ftrunc_s_w(MSARegister wd, MSARegister ws);
1304 void ftrunc_s_d(MSARegister wd, MSARegister ws);
1305 void ftrunc_u_w(MSARegister wd, MSARegister ws);
1306 void ftrunc_u_d(MSARegister wd, MSARegister ws);
1307 void fsqrt_w(MSARegister wd, MSARegister ws);
1308 void fsqrt_d(MSARegister wd, MSARegister ws);
1309 void frsqrt_w(MSARegister wd, MSARegister ws);
1310 void frsqrt_d(MSARegister wd, MSARegister ws);
1311 void frcp_w(MSARegister wd, MSARegister ws);
1312 void frcp_d(MSARegister wd, MSARegister ws);
1313 void frint_w(MSARegister wd, MSARegister ws);
1314 void frint_d(MSARegister wd, MSARegister ws);
1315 void flog2_w(MSARegister wd, MSARegister ws);
1316 void flog2_d(MSARegister wd, MSARegister ws);
1317 void fexupl_w(MSARegister wd, MSARegister ws);
1318 void fexupl_d(MSARegister wd, MSARegister ws);
1319 void fexupr_w(MSARegister wd, MSARegister ws);
1320 void fexupr_d(MSARegister wd, MSARegister ws);
1321 void ffql_w(MSARegister wd, MSARegister ws);
1322 void ffql_d(MSARegister wd, MSARegister ws);
1323 void ffqr_w(MSARegister wd, MSARegister ws);
1324 void ffqr_d(MSARegister wd, MSARegister ws);
1325 void ftint_s_w(MSARegister wd, MSARegister ws);
1326 void ftint_s_d(MSARegister wd, MSARegister ws);
1327 void ftint_u_w(MSARegister wd, MSARegister ws);
1328 void ftint_u_d(MSARegister wd, MSARegister ws);
1329 void ffint_s_w(MSARegister wd, MSARegister ws);
1330 void ffint_s_d(MSARegister wd, MSARegister ws);
1331 void ffint_u_w(MSARegister wd, MSARegister ws);
1332 void ffint_u_d(MSARegister wd, MSARegister ws);
1334 void sll_b(MSARegister wd, MSARegister ws, MSARegister wt);
1335 void sll_h(MSARegister wd, MSARegister ws, MSARegister wt);
1336 void sll_w(MSARegister wd, MSARegister ws, MSARegister wt);
1337 void sll_d(MSARegister wd, MSARegister ws, MSARegister wt);
1338 void sra_b(MSARegister wd, MSARegister ws, MSARegister wt);
1339 void sra_h(MSARegister wd, MSARegister ws, MSARegister wt);
1340 void sra_w(MSARegister wd, MSARegister ws, MSARegister wt);
1341 void sra_d(MSARegister wd, MSARegister ws, MSARegister wt);
1342 void srl_b(MSARegister wd, MSARegister ws, MSARegister wt);
1343 void srl_h(MSARegister wd, MSARegister ws, MSARegister wt);
1344 void srl_w(MSARegister wd, MSARegister ws, MSARegister wt);
1345 void srl_d(MSARegister wd, MSARegister ws, MSARegister wt);
1346 void bclr_b(MSARegister wd, MSARegister ws, MSARegister wt);
1347 void bclr_h(MSARegister wd, MSARegister ws, MSARegister wt);
1348 void bclr_w(MSARegister wd, MSARegister ws, MSARegister wt);
1349 void bclr_d(MSARegister wd, MSARegister ws, MSARegister wt);
1350 void bset_b(MSARegister wd, MSARegister ws, MSARegister wt);
1351 void bset_h(MSARegister wd, MSARegister ws, MSARegister wt);
1352 void bset_w(MSARegister wd, MSARegister ws, MSARegister wt);
1353 void bset_d(MSARegister wd, MSARegister ws, MSARegister wt);
1354 void bneg_b(MSARegister wd, MSARegister ws, MSARegister wt);
1355 void bneg_h(MSARegister wd, MSARegister ws, MSARegister wt);
1356 void bneg_w(MSARegister wd, MSARegister ws, MSARegister wt);
1357 void bneg_d(MSARegister wd, MSARegister ws, MSARegister wt);
1358 void binsl_b(MSARegister wd, MSARegister ws, MSARegister wt);
1359 void binsl_h(MSARegister wd, MSARegister ws, MSARegister wt);
1360 void binsl_w(MSARegister wd, MSARegister ws, MSARegister wt);
1361 void binsl_d(MSARegister wd, MSARegister ws, MSARegister wt);
1362 void binsr_b(MSARegister wd, MSARegister ws, MSARegister wt);
1363 void binsr_h(MSARegister wd, MSARegister ws, MSARegister wt);
1364 void binsr_w(MSARegister wd, MSARegister ws, MSARegister wt);
1365 void binsr_d(MSARegister wd, MSARegister ws, MSARegister wt);
1366 void addv_b(MSARegister wd, MSARegister ws, MSARegister wt);
1367 void addv_h(MSARegister wd, MSARegister ws, MSARegister wt);
1368 void addv_w(MSARegister wd, MSARegister ws, MSARegister wt);
1369 void addv_d(MSARegister wd, MSARegister ws, MSARegister wt);
1370 void subv_b(MSARegister wd, MSARegister ws, MSARegister wt);
1371 void subv_h(MSARegister wd, MSARegister ws, MSARegister wt);
1372 void subv_w(MSARegister wd, MSARegister ws, MSARegister wt);
1373 void subv_d(MSARegister wd, MSARegister ws, MSARegister wt);
1374 void max_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1375 void max_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1376 void max_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1377 void max_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1378 void max_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1379 void max_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1380 void max_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1381 void max_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1382 void min_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1383 void min_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1384 void min_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1385 void min_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1386 void min_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1387 void min_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1388 void min_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1389 void min_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1390 void max_a_b(MSARegister wd, MSARegister ws, MSARegister wt);
1391 void max_a_h(MSARegister wd, MSARegister ws, MSARegister wt);
1392 void max_a_w(MSARegister wd, MSARegister ws, MSARegister wt);
1393 void max_a_d(MSARegister wd, MSARegister ws, MSARegister wt);
1394 void min_a_b(MSARegister wd, MSARegister ws, MSARegister wt);
1395 void min_a_h(MSARegister wd, MSARegister ws, MSARegister wt);
1396 void min_a_w(MSARegister wd, MSARegister ws, MSARegister wt);
1397 void min_a_d(MSARegister wd, MSARegister ws, MSARegister wt);
1398 void ceq_b(MSARegister wd, MSARegister ws, MSARegister wt);
1399 void ceq_h(MSARegister wd, MSARegister ws, MSARegister wt);
1400 void ceq_w(MSARegister wd, MSARegister ws, MSARegister wt);
1401 void ceq_d(MSARegister wd, MSARegister ws, MSARegister wt);
1402 void clt_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1403 void clt_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1404 void clt_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1405 void clt_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1406 void clt_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1407 void clt_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1408 void clt_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1409 void clt_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1410 void cle_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1411 void cle_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1412 void cle_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1413 void cle_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1414 void cle_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1415 void cle_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1416 void cle_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1417 void cle_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1418 void add_a_b(MSARegister wd, MSARegister ws, MSARegister wt);
1419 void add_a_h(MSARegister wd, MSARegister ws, MSARegister wt);
1420 void add_a_w(MSARegister wd, MSARegister ws, MSARegister wt);
1421 void add_a_d(MSARegister wd, MSARegister ws, MSARegister wt);
1422 void adds_a_b(MSARegister wd, MSARegister ws, MSARegister wt);
1423 void adds_a_h(MSARegister wd, MSARegister ws, MSARegister wt);
1424 void adds_a_w(MSARegister wd, MSARegister ws, MSARegister wt);
1425 void adds_a_d(MSARegister wd, MSARegister ws, MSARegister wt);
1426 void adds_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1427 void adds_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1428 void adds_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1429 void adds_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1430 void adds_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1431 void adds_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1432 void adds_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1433 void adds_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1434 void ave_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1435 void ave_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1436 void ave_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1437 void ave_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1438 void ave_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1439 void ave_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1440 void ave_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1441 void ave_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1442 void aver_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1443 void aver_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1444 void aver_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1445 void aver_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1446 void aver_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1447 void aver_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1448 void aver_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1449 void aver_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1450 void subs_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1451 void subs_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1452 void subs_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1453 void subs_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1454 void subs_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1455 void subs_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1456 void subs_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1457 void subs_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1458 void subsus_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1459 void subsus_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1460 void subsus_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1461 void subsus_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1462 void subsus_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1463 void subsus_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1464 void subsus_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1465 void subsus_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1466 void subsuu_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1467 void subsuu_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1468 void subsuu_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1469 void subsuu_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1470 void subsuu_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1471 void subsuu_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1472 void subsuu_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1473 void subsuu_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1474 void asub_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1475 void asub_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1476 void asub_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1477 void asub_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1478 void asub_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1479 void asub_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1480 void asub_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1481 void asub_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1482 void mulv_b(MSARegister wd, MSARegister ws, MSARegister wt);
1483 void mulv_h(MSARegister wd, MSARegister ws, MSARegister wt);
1484 void mulv_w(MSARegister wd, MSARegister ws, MSARegister wt);
1485 void mulv_d(MSARegister wd, MSARegister ws, MSARegister wt);
1486 void maddv_b(MSARegister wd, MSARegister ws, MSARegister wt);
1487 void maddv_h(MSARegister wd, MSARegister ws, MSARegister wt);
1488 void maddv_w(MSARegister wd, MSARegister ws, MSARegister wt);
1489 void maddv_d(MSARegister wd, MSARegister ws, MSARegister wt);
1490 void msubv_b(MSARegister wd, MSARegister ws, MSARegister wt);
1491 void msubv_h(MSARegister wd, MSARegister ws, MSARegister wt);
1492 void msubv_w(MSARegister wd, MSARegister ws, MSARegister wt);
1493 void msubv_d(MSARegister wd, MSARegister ws, MSARegister wt);
1494 void div_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1495 void div_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1496 void div_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1497 void div_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1498 void div_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1499 void div_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1500 void div_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1501 void div_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1502 void mod_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1503 void mod_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1504 void mod_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1505 void mod_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1506 void mod_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1507 void mod_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1508 void mod_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1509 void mod_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1510 void dotp_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1511 void dotp_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1512 void dotp_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1513 void dotp_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1514 void dotp_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1515 void dotp_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1516 void dotp_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1517 void dotp_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1518 void dpadd_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1519 void dpadd_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1520 void dpadd_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1521 void dpadd_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1522 void dpadd_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1523 void dpadd_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1524 void dpadd_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1525 void dpadd_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1526 void dpsub_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1527 void dpsub_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1528 void dpsub_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1529 void dpsub_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1530 void dpsub_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1531 void dpsub_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1532 void dpsub_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1533 void dpsub_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1534 void sld_b(MSARegister wd, MSARegister ws, Register rt);
1535 void sld_h(MSARegister wd, MSARegister ws, Register rt);
1536 void sld_w(MSARegister wd, MSARegister ws, Register rt);
1537 void sld_d(MSARegister wd, MSARegister ws, Register rt);
1538 void splat_b(MSARegister wd, MSARegister ws, Register rt);
1539 void splat_h(MSARegister wd, MSARegister ws, Register rt);
1540 void splat_w(MSARegister wd, MSARegister ws, Register rt);
1541 void splat_d(MSARegister wd, MSARegister ws, Register rt);
1542 void pckev_b(MSARegister wd, MSARegister ws, MSARegister wt);
1543 void pckev_h(MSARegister wd, MSARegister ws, MSARegister wt);
1544 void pckev_w(MSARegister wd, MSARegister ws, MSARegister wt);
1545 void pckev_d(MSARegister wd, MSARegister ws, MSARegister wt);
1546 void pckod_b(MSARegister wd, MSARegister ws, MSARegister wt);
1547 void pckod_h(MSARegister wd, MSARegister ws, MSARegister wt);
1548 void pckod_w(MSARegister wd, MSARegister ws, MSARegister wt);
1549 void pckod_d(MSARegister wd, MSARegister ws, MSARegister wt);
1550 void ilvl_b(MSARegister wd, MSARegister ws, MSARegister wt);
1551 void ilvl_h(MSARegister wd, MSARegister ws, MSARegister wt);
1552 void ilvl_w(MSARegister wd, MSARegister ws, MSARegister wt);
1553 void ilvl_d(MSARegister wd, MSARegister ws, MSARegister wt);
1554 void ilvr_b(MSARegister wd, MSARegister ws, MSARegister wt);
1555 void ilvr_h(MSARegister wd, MSARegister ws, MSARegister wt);
1556 void ilvr_w(MSARegister wd, MSARegister ws, MSARegister wt);
1557 void ilvr_d(MSARegister wd, MSARegister ws, MSARegister wt);
1558 void ilvev_b(MSARegister wd, MSARegister ws, MSARegister wt);
1559 void ilvev_h(MSARegister wd, MSARegister ws, MSARegister wt);
1560 void ilvev_w(MSARegister wd, MSARegister ws, MSARegister wt);
1561 void ilvev_d(MSARegister wd, MSARegister ws, MSARegister wt);
1562 void ilvod_b(MSARegister wd, MSARegister ws, MSARegister wt);
1563 void ilvod_h(MSARegister wd, MSARegister ws, MSARegister wt);
1564 void ilvod_w(MSARegister wd, MSARegister ws, MSARegister wt);
1565 void ilvod_d(MSARegister wd, MSARegister ws, MSARegister wt);
1566 void vshf_b(MSARegister wd, MSARegister ws, MSARegister wt);
1567 void vshf_h(MSARegister wd, MSARegister ws, MSARegister wt);
1568 void vshf_w(MSARegister wd, MSARegister ws, MSARegister wt);
1569 void vshf_d(MSARegister wd, MSARegister ws, MSARegister wt);
1570 void srar_b(MSARegister wd, MSARegister ws, MSARegister wt);
1571 void srar_h(MSARegister wd, MSARegister ws, MSARegister wt);
1572 void srar_w(MSARegister wd, MSARegister ws, MSARegister wt);
1573 void srar_d(MSARegister wd, MSARegister ws, MSARegister wt);
1574 void srlr_b(MSARegister wd, MSARegister ws, MSARegister wt);
1575 void srlr_h(MSARegister wd, MSARegister ws, MSARegister wt);
1576 void srlr_w(MSARegister wd, MSARegister ws, MSARegister wt);
1577 void srlr_d(MSARegister wd, MSARegister ws, MSARegister wt);
1578 void hadd_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1579 void hadd_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1580 void hadd_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1581 void hadd_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1582 void hadd_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1583 void hadd_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1584 void hadd_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1585 void hadd_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1586 void hsub_s_b(MSARegister wd, MSARegister ws, MSARegister wt);
1587 void hsub_s_h(MSARegister wd, MSARegister ws, MSARegister wt);
1588 void hsub_s_w(MSARegister wd, MSARegister ws, MSARegister wt);
1589 void hsub_s_d(MSARegister wd, MSARegister ws, MSARegister wt);
1590 void hsub_u_b(MSARegister wd, MSARegister ws, MSARegister wt);
1591 void hsub_u_h(MSARegister wd, MSARegister ws, MSARegister wt);
1592 void hsub_u_w(MSARegister wd, MSARegister ws, MSARegister wt);
1593 void hsub_u_d(MSARegister wd, MSARegister ws, MSARegister wt);
1595 void fcaf_w(MSARegister wd, MSARegister ws, MSARegister wt);
1596 void fcaf_d(MSARegister wd, MSARegister ws, MSARegister wt);
1597 void fcun_w(MSARegister wd, MSARegister ws, MSARegister wt);
1598 void fcun_d(MSARegister wd, MSARegister ws, MSARegister wt);
1599 void fceq_w(MSARegister wd, MSARegister ws, MSARegister wt);
1600 void fceq_d(MSARegister wd, MSARegister ws, MSARegister wt);
1601 void fcueq_w(MSARegister wd, MSARegister ws, MSARegister wt);
1602 void fcueq_d(MSARegister wd, MSARegister ws, MSARegister wt);
1603 void fclt_w(MSARegister wd, MSARegister ws, MSARegister wt);
1604 void fclt_d(MSARegister wd, MSARegister ws, MSARegister wt);
1605 void fcult_w(MSARegister wd, MSARegister ws, MSARegister wt);
1606 void fcult_d(MSARegister wd, MSARegister ws, MSARegister wt);
1607 void fcle_w(MSARegister wd, MSARegister ws, MSARegister wt);
1608 void fcle_d(MSARegister wd, MSARegister ws, MSARegister wt);
1609 void fcule_w(MSARegister wd, MSARegister ws, MSARegister wt);
1610 void fcule_d(MSARegister wd, MSARegister ws, MSARegister wt);
1611 void fsaf_w(MSARegister wd, MSARegister ws, MSARegister wt);
1612 void fsaf_d(MSARegister wd, MSARegister ws, MSARegister wt);
1613 void fsun_w(MSARegister wd, MSARegister ws, MSARegister wt);
1614 void fsun_d(MSARegister wd, MSARegister ws, MSARegister wt);
1615 void fseq_w(MSARegister wd, MSARegister ws, MSARegister wt);
1616 void fseq_d(MSARegister wd, MSARegister ws, MSARegister wt);
1617 void fsueq_w(MSARegister wd, MSARegister ws, MSARegister wt);
1618 void fsueq_d(MSARegister wd, MSARegister ws, MSARegister wt);
1619 void fslt_w(MSARegister wd, MSARegister ws, MSARegister wt);
1620 void fslt_d(MSARegister wd, MSARegister ws, MSARegister wt);
1621 void fsult_w(MSARegister wd, MSARegister ws, MSARegister wt);
1622 void fsult_d(MSARegister wd, MSARegister ws, MSARegister wt);
1623 void fsle_w(MSARegister wd, MSARegister ws, MSARegister wt);
1624 void fsle_d(MSARegister wd, MSARegister ws, MSARegister wt);
1625 void fsule_w(MSARegister wd, MSARegister ws, MSARegister wt);
1626 void fsule_d(MSARegister wd, MSARegister ws, MSARegister wt);
1627 void fadd_w(MSARegister wd, MSARegister ws, MSARegister wt);
1628 void fadd_d(MSARegister wd, MSARegister ws, MSARegister wt);
1629 void fsub_w(MSARegister wd, MSARegister ws, MSARegister wt);
1630 void fsub_d(MSARegister wd, MSARegister ws, MSARegister wt);
1631 void fmul_w(MSARegister wd, MSARegister ws, MSARegister wt);
1632 void fmul_d(MSARegister wd, MSARegister ws, MSARegister wt);
1633 void fdiv_w(MSARegister wd, MSARegister ws, MSARegister wt);
1634 void fdiv_d(MSARegister wd, MSARegister ws, MSARegister wt);
1635 void fmadd_w(MSARegister wd, MSARegister ws, MSARegister wt);
1636 void fmadd_d(MSARegister wd, MSARegister ws, MSARegister wt);
1637 void fmsub_w(MSARegister wd, MSARegister ws, MSARegister wt);
1638 void fmsub_d(MSARegister wd, MSARegister ws, MSARegister wt);
1639 void fexp2_w(MSARegister wd, MSARegister ws, MSARegister wt);
1640 void fexp2_d(MSARegister wd, MSARegister ws, MSARegister wt);
1641 void fexdo_h(MSARegister wd, MSARegister ws, MSARegister wt);
1642 void fexdo_w(MSARegister wd, MSARegister ws, MSARegister wt);
1643 void ftq_h(MSARegister wd, MSARegister ws, MSARegister wt);
1644 void ftq_w(MSARegister wd, MSARegister ws, MSARegister wt);
1645 void fmin_w(MSARegister wd, MSARegister ws, MSARegister wt);
1646 void fmin_d(MSARegister wd, MSARegister ws, MSARegister wt);
1647 void fmin_a_w(MSARegister wd, MSARegister ws, MSARegister wt);
1648 void fmin_a_d(MSARegister wd, MSARegister ws, MSARegister wt);
1649 void fmax_w(MSARegister wd, MSARegister ws, MSARegister wt);
1650 void fmax_d(MSARegister wd, MSARegister ws, MSARegister wt);
1651 void fmax_a_w(MSARegister wd, MSARegister ws, MSARegister wt);
1652 void fmax_a_d(MSARegister wd, MSARegister ws, MSARegister wt);
1653 void fcor_w(MSARegister wd, MSARegister ws, MSARegister wt);
1654 void fcor_d(MSARegister wd, MSARegister ws, MSARegister wt);
1655 void fcune_w(MSARegister wd, MSARegister ws, MSARegister wt);
1656 void fcune_d(MSARegister wd, MSARegister ws, MSARegister wt);
1657 void fcne_w(MSARegister wd, MSARegister ws, MSARegister wt);
1658 void fcne_d(MSARegister wd, MSARegister ws, MSARegister wt);
1659 void mul_q_h(MSARegister wd, MSARegister ws, MSARegister wt);
1660 void mul_q_w(MSARegister wd, MSARegister ws, MSARegister wt);
1661 void madd_q_h(MSARegister wd, MSARegister ws, MSARegister wt);
1662 void madd_q_w(MSARegister wd, MSARegister ws, MSARegister wt);
1663 void msub_q_h(MSARegister wd, MSARegister ws, MSARegister wt);
1664 void msub_q_w(MSARegister wd, MSARegister ws, MSARegister wt);
1665 void fsor_w(MSARegister wd, MSARegister ws, MSARegister wt);
1666 void fsor_d(MSARegister wd, MSARegister ws, MSARegister wt);
1667 void fsune_w(MSARegister wd, MSARegister ws, MSARegister wt);
1668 void fsune_d(MSARegister wd, MSARegister ws, MSARegister wt);
1669 void fsne_w(MSARegister wd, MSARegister ws, MSARegister wt);
1670 void fsne_d(MSARegister wd, MSARegister ws, MSARegister wt);
1671 void mulr_q_h(MSARegister wd, MSARegister ws, MSARegister wt);
1672 void mulr_q_w(MSARegister wd, MSARegister ws, MSARegister wt);
1673 void maddr_q_h(MSARegister wd, MSARegister ws, MSARegister wt);
1674 void maddr_q_w(MSARegister wd, MSARegister ws, MSARegister wt);
1675 void msubr_q_h(MSARegister wd, MSARegister ws, MSARegister wt);
1676 void msubr_q_w(MSARegister wd, MSARegister ws, MSARegister wt);
1678 void sldi_b(MSARegister wd, MSARegister ws,
uint32_t n);
1679 void sldi_h(MSARegister wd, MSARegister ws,
uint32_t n);
1680 void sldi_w(MSARegister wd, MSARegister ws,
uint32_t n);
1681 void sldi_d(MSARegister wd, MSARegister ws,
uint32_t n);
1682 void splati_b(MSARegister wd, MSARegister ws,
uint32_t n);
1683 void splati_h(MSARegister wd, MSARegister ws,
uint32_t n);
1684 void splati_w(MSARegister wd, MSARegister ws,
uint32_t n);
1685 void splati_d(MSARegister wd, MSARegister ws,
uint32_t n);
1686 void copy_s_b(Register rd, MSARegister ws,
uint32_t n);
1687 void copy_s_h(Register rd, MSARegister ws,
uint32_t n);
1688 void copy_s_w(Register rd, MSARegister ws,
uint32_t n);
1689 void copy_s_d(Register rd, MSARegister ws,
uint32_t n);
1690 void copy_u_b(Register rd, MSARegister ws,
uint32_t n);
1691 void copy_u_h(Register rd, MSARegister ws,
uint32_t n);
1692 void copy_u_w(Register rd, MSARegister ws,
uint32_t n);
1693 void insert_b(MSARegister wd,
uint32_t n, Register rs);
1694 void insert_h(MSARegister wd,
uint32_t n, Register rs);
1695 void insert_w(MSARegister wd,
uint32_t n, Register rs);
1696 void insert_d(MSARegister wd,
uint32_t n, Register rs);
1697 void insve_b(MSARegister wd,
uint32_t n, MSARegister ws);
1698 void insve_h(MSARegister wd,
uint32_t n, MSARegister ws);
1699 void insve_w(MSARegister wd,
uint32_t n, MSARegister ws);
1700 void insve_d(MSARegister wd,
uint32_t n, MSARegister ws);
1701 void move_v(MSARegister wd, MSARegister ws);
1702 void ctcmsa(MSAControlRegister cd, Register rs);
1703 void cfcmsa(Register rd, MSAControlRegister cs);
1705 void slli_b(MSARegister wd, MSARegister ws,
uint32_t m);
1706 void slli_h(MSARegister wd, MSARegister ws,
uint32_t m);
1707 void slli_w(MSARegister wd, MSARegister ws,
uint32_t m);
1708 void slli_d(MSARegister wd, MSARegister ws,
uint32_t m);
1709 void srai_b(MSARegister wd, MSARegister ws,
uint32_t m);
1710 void srai_h(MSARegister wd, MSARegister ws,
uint32_t m);
1711 void srai_w(MSARegister wd, MSARegister ws,
uint32_t m);
1712 void srai_d(MSARegister wd, MSARegister ws,
uint32_t m);
1713 void srli_b(MSARegister wd, MSARegister ws,
uint32_t m);
1714 void srli_h(MSARegister wd, MSARegister ws,
uint32_t m);
1715 void srli_w(MSARegister wd, MSARegister ws,
uint32_t m);
1716 void srli_d(MSARegister wd, MSARegister ws,
uint32_t m);
1717 void bclri_b(MSARegister wd, MSARegister ws,
uint32_t m);
1718 void bclri_h(MSARegister wd, MSARegister ws,
uint32_t m);
1719 void bclri_w(MSARegister wd, MSARegister ws,
uint32_t m);
1720 void bclri_d(MSARegister wd, MSARegister ws,
uint32_t m);
1721 void bseti_b(MSARegister wd, MSARegister ws,
uint32_t m);
1722 void bseti_h(MSARegister wd, MSARegister ws,
uint32_t m);
1723 void bseti_w(MSARegister wd, MSARegister ws,
uint32_t m);
1724 void bseti_d(MSARegister wd, MSARegister ws,
uint32_t m);
1725 void bnegi_b(MSARegister wd, MSARegister ws,
uint32_t m);
1726 void bnegi_h(MSARegister wd, MSARegister ws,
uint32_t m);
1727 void bnegi_w(MSARegister wd, MSARegister ws,
uint32_t m);
1728 void bnegi_d(MSARegister wd, MSARegister ws,
uint32_t m);
1729 void binsli_b(MSARegister wd, MSARegister ws,
uint32_t m);
1730 void binsli_h(MSARegister wd, MSARegister ws,
uint32_t m);
1731 void binsli_w(MSARegister wd, MSARegister ws,
uint32_t m);
1732 void binsli_d(MSARegister wd, MSARegister ws,
uint32_t m);
1733 void binsri_b(MSARegister wd, MSARegister ws,
uint32_t m);
1734 void binsri_h(MSARegister wd, MSARegister ws,
uint32_t m);
1735 void binsri_w(MSARegister wd, MSARegister ws,
uint32_t m);
1736 void binsri_d(MSARegister wd, MSARegister ws,
uint32_t m);
1737 void sat_s_b(MSARegister wd, MSARegister ws,
uint32_t m);
1738 void sat_s_h(MSARegister wd, MSARegister ws,
uint32_t m);
1739 void sat_s_w(MSARegister wd, MSARegister ws,
uint32_t m);
1740 void sat_s_d(MSARegister wd, MSARegister ws,
uint32_t m);
1741 void sat_u_b(MSARegister wd, MSARegister ws,
uint32_t m);
1742 void sat_u_h(MSARegister wd, MSARegister ws,
uint32_t m);
1743 void sat_u_w(MSARegister wd, MSARegister ws,
uint32_t m);
1744 void sat_u_d(MSARegister wd, MSARegister ws,
uint32_t m);
1745 void srari_b(MSARegister wd, MSARegister ws,
uint32_t m);
1746 void srari_h(MSARegister wd, MSARegister ws,
uint32_t m);
1747 void srari_w(MSARegister wd, MSARegister ws,
uint32_t m);
1748 void srari_d(MSARegister wd, MSARegister ws,
uint32_t m);
1749 void srlri_b(MSARegister wd, MSARegister ws,
uint32_t m);
1750 void srlri_h(MSARegister wd, MSARegister ws,
uint32_t m);
1751 void srlri_w(MSARegister wd, MSARegister ws,
uint32_t m);
1752 void srlri_d(MSARegister wd, MSARegister ws,
uint32_t m);
1755 int SizeOfCodeGeneratedSince(Label* label) {
1756 return pc_offset() - label->pos();
1760 int InstructionsGeneratedSince(Label* label) {
1761 return SizeOfCodeGeneratedSince(label) / kInstrSize;
1765 class BlockTrampolinePoolScope {
1767 explicit BlockTrampolinePoolScope(Assembler* assem) : assem_(assem) {
1768 assem_->StartBlockTrampolinePool();
1770 ~BlockTrampolinePoolScope() {
1771 assem_->EndBlockTrampolinePool();
1777 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockTrampolinePoolScope);
1784 class BlockGrowBufferScope {
1786 explicit BlockGrowBufferScope(Assembler* assem) : assem_(assem) {
1787 assem_->StartBlockGrowBuffer();
1789 ~BlockGrowBufferScope() {
1790 assem_->EndBlockGrowBuffer();
1796 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockGrowBufferScope);
1801 void RecordComment(
const char* msg);
1805 void RecordDeoptReason(DeoptimizeReason reason, SourcePosition position,
1808 static int RelocateInternalReference(RelocInfo::Mode rmode, Address pc,
1813 void db(uint8_t data);
1815 void dq(uint64_t data);
1817 void dd(Label* label);
1821 void BlockTrampolinePoolFor(
int instructions);
1826 inline bool overflow()
const {
return pc_ >= reloc_info_writer.pos() - kGap; }
1829 inline intptr_t available_space()
const {
1830 return reloc_info_writer.pos() - pc_;
1834 static Instr instr_at(Address pc) {
return *
reinterpret_cast<Instr*
>(pc); }
1835 static void instr_at_put(Address pc, Instr instr) {
1836 *
reinterpret_cast<Instr*
>(pc) = instr;
1838 Instr instr_at(
int pos) {
return *
reinterpret_cast<Instr*
>(buffer_ + pos); }
1839 void instr_at_put(
int pos, Instr instr) {
1840 *
reinterpret_cast<Instr*
>(buffer_ + pos) = instr;
1844 static bool IsBranch(Instr instr);
1845 static bool IsMsaBranch(Instr instr);
1846 static bool IsBc(Instr instr);
1847 static bool IsNal(Instr instr);
1848 static bool IsBzc(Instr instr);
1850 static bool IsBeq(Instr instr);
1851 static bool IsBne(Instr instr);
1852 static bool IsBeqzc(Instr instr);
1853 static bool IsBnezc(Instr instr);
1854 static bool IsBeqc(Instr instr);
1855 static bool IsBnec(Instr instr);
1858 static bool IsJump(Instr instr);
1859 static bool IsJ(Instr instr);
1860 static bool IsLui(Instr instr);
1861 static bool IsOri(Instr instr);
1862 static bool IsMov(Instr instr, Register rd, Register rs);
1864 static bool IsJal(Instr instr);
1865 static bool IsJr(Instr instr);
1866 static bool IsJalr(Instr instr);
1868 static bool IsNop(Instr instr,
unsigned int type);
1869 static bool IsPop(Instr instr);
1870 static bool IsPush(Instr instr);
1871 static bool IsLwRegFpOffset(Instr instr);
1872 static bool IsSwRegFpOffset(Instr instr);
1873 static bool IsLwRegFpNegOffset(Instr instr);
1874 static bool IsSwRegFpNegOffset(Instr instr);
1876 static Register GetRtReg(Instr instr);
1877 static Register GetRsReg(Instr instr);
1878 static Register GetRdReg(Instr instr);
1880 static uint32_t GetRt(Instr instr);
1881 static uint32_t GetRtField(Instr instr);
1882 static uint32_t GetRs(Instr instr);
1883 static uint32_t GetRsField(Instr instr);
1884 static uint32_t GetRd(Instr instr);
1885 static uint32_t GetRdField(Instr instr);
1886 static uint32_t GetSa(Instr instr);
1887 static uint32_t GetSaField(Instr instr);
1888 static uint32_t GetOpcodeField(Instr instr);
1889 static uint32_t GetFunction(Instr instr);
1890 static uint32_t GetFunctionField(Instr instr);
1891 static uint32_t GetImmediate16(Instr instr);
1892 static uint32_t GetLabelConst(Instr instr);
1894 static int32_t GetBranchOffset(Instr instr);
1895 static bool IsLw(Instr instr);
1896 static int16_t GetLwOffset(Instr instr);
1897 static Instr SetLwOffset(Instr instr, int16_t offset);
1899 static bool IsSw(Instr instr);
1900 static Instr SetSwOffset(Instr instr, int16_t offset);
1901 static bool IsAddImmediate(Instr instr);
1902 static Instr SetAddImmediateOffset(Instr instr, int16_t offset);
1904 static bool IsAndImmediate(Instr instr);
1905 static bool IsEmittedConstant(Instr instr);
1907 void CheckTrampolinePool();
1909 bool IsPrevInstrCompactBranch() {
return prev_instr_compact_branch_; }
1910 static bool IsCompactBranchSupported() {
return kArchVariant == kMips64r6; }
1912 inline int UnboundLabelsCount() {
return unbound_labels_count_; }
1916 void lsa(Register rd, Register rt, Register rs, uint8_t sa);
1917 void dlsa(Register rd, Register rt, Register rs, uint8_t sa);
1921 enum class OffsetAccessType :
bool {
1922 SINGLE_ACCESS =
false,
1927 void AdjustBaseAndOffset(
1929 OffsetAccessType access_type = OffsetAccessType::SINGLE_ACCESS,
1930 int second_access_add_to_offset = 4);
1932 inline static void set_target_internal_reference_encoded_at(Address pc,
1935 int64_t buffer_space()
const {
return reloc_info_writer.pos() - pc_; }
1938 int target_at(
int pos,
bool is_internal);
1941 void target_at_put(
int pos,
int target_pos,
bool is_internal);
1944 bool MustUseReg(RelocInfo::Mode rmode);
1947 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0);
1950 void BlockTrampolinePoolBefore(
int pc_offset) {
1951 if (no_trampoline_pool_before_ < pc_offset)
1952 no_trampoline_pool_before_ = pc_offset;
1955 void StartBlockTrampolinePool() {
1956 trampoline_pool_blocked_nesting_++;
1959 void EndBlockTrampolinePool() {
1960 trampoline_pool_blocked_nesting_--;
1961 if (trampoline_pool_blocked_nesting_ == 0) {
1962 CheckTrampolinePoolQuick(1);
1966 bool is_trampoline_pool_blocked()
const {
1967 return trampoline_pool_blocked_nesting_ > 0;
1970 bool has_exception()
const {
1971 return internal_trampoline_exception_;
1974 bool is_trampoline_emitted()
const {
1975 return trampoline_emitted_;
1979 void StartBlockGrowBuffer() {
1980 DCHECK(!block_buffer_growth_);
1981 block_buffer_growth_ =
true;
1984 void EndBlockGrowBuffer() {
1985 DCHECK(block_buffer_growth_);
1986 block_buffer_growth_ =
false;
1989 bool is_buffer_growth_blocked()
const {
1990 return block_buffer_growth_;
1993 void EmitForbiddenSlotInstruction() {
1994 if (IsPrevInstrCompactBranch()) {
1999 void CheckTrampolinePoolQuick(
int extra_instructions = 0) {
2000 if (pc_offset() >= next_buffer_check_ - extra_instructions * kInstrSize) {
2001 CheckTrampolinePool();
2007 static const int kMaximalBufferSize = 512 * MB;
2011 static constexpr
int kBufferCheckInterval = 1 * KB / 2;
2018 static constexpr
int kGap = 128;
2023 static constexpr
int kCheckConstIntervalInst = 32;
2024 static constexpr
int kCheckConstInterval =
2025 kCheckConstIntervalInst * kInstrSize;
2027 int next_buffer_check_;
2030 int trampoline_pool_blocked_nesting_;
2031 int no_trampoline_pool_before_;
2034 int last_trampoline_pool_end_;
2037 bool block_buffer_growth_;
2041 static constexpr
int kMaxRelocSize = RelocInfoWriter::kMaxSize;
2042 RelocInfoWriter reloc_info_writer;
2045 int last_bound_pos_;
2048 enum class CompactBranchType :
bool { NO =
false, COMPACT_BRANCH =
true };
2051 inline void CheckBuffer();
2053 inline void emit(Instr x,
2054 CompactBranchType is_compact_branch = CompactBranchType::NO);
2055 inline void emit(uint64_t x);
2056 inline void CheckForEmitInForbiddenSlot();
2057 template <
typename T>
2058 inline void EmitHelper(T x);
2059 inline void EmitHelper(Instr x, CompactBranchType is_compact_branch);
2069 void GenInstrRegister(Opcode opcode, Register rs, Register rt, Register rd,
2070 uint16_t sa = 0, SecondaryField func = nullptrSF);
2072 void GenInstrRegister(Opcode opcode,
2077 SecondaryField func);
2079 void GenInstrRegister(Opcode opcode, SecondaryField fmt, FPURegister ft,
2080 FPURegister fs, FPURegister fd,
2081 SecondaryField func = nullptrSF);
2083 void GenInstrRegister(Opcode opcode, FPURegister fr, FPURegister ft,
2084 FPURegister fs, FPURegister fd,
2085 SecondaryField func = nullptrSF);
2087 void GenInstrRegister(Opcode opcode, SecondaryField fmt, Register rt,
2088 FPURegister fs, FPURegister fd,
2089 SecondaryField func = nullptrSF);
2091 void GenInstrRegister(Opcode opcode, SecondaryField fmt, Register rt,
2092 FPUControlRegister fs, SecondaryField func = nullptrSF);
2094 void GenInstrImmediate(
2095 Opcode opcode, Register rs, Register rt, int32_t j,
2096 CompactBranchType is_compact_branch = CompactBranchType::NO);
2097 void GenInstrImmediate(
2098 Opcode opcode, Register rs, SecondaryField SF, int32_t j,
2099 CompactBranchType is_compact_branch = CompactBranchType::NO);
2100 void GenInstrImmediate(
2101 Opcode opcode, Register r1, FPURegister r2, int32_t j,
2102 CompactBranchType is_compact_branch = CompactBranchType::NO);
2103 void GenInstrImmediate(Opcode opcode, Register base, Register rt,
2104 int32_t offset9,
int bit6, SecondaryField func);
2105 void GenInstrImmediate(
2106 Opcode opcode, Register rs, int32_t offset21,
2107 CompactBranchType is_compact_branch = CompactBranchType::NO);
2108 void GenInstrImmediate(Opcode opcode, Register rs,
uint32_t offset21);
2109 void GenInstrImmediate(
2110 Opcode opcode, int32_t offset26,
2111 CompactBranchType is_compact_branch = CompactBranchType::NO);
2113 void GenInstrJump(Opcode opcode,
2117 void GenInstrMsaI8(SecondaryField operation,
uint32_t imm8, MSARegister ws,
2120 void GenInstrMsaI5(SecondaryField operation, SecondaryField df, int32_t imm5,
2121 MSARegister ws, MSARegister wd);
2123 void GenInstrMsaBit(SecondaryField operation, SecondaryField df,
uint32_t m,
2124 MSARegister ws, MSARegister wd);
2126 void GenInstrMsaI10(SecondaryField operation, SecondaryField df,
2127 int32_t imm10, MSARegister wd);
2129 template <
typename RegType>
2130 void GenInstrMsa3R(SecondaryField operation, SecondaryField df, RegType t,
2131 MSARegister ws, MSARegister wd);
2133 template <
typename DstType,
typename SrcType>
2134 void GenInstrMsaElm(SecondaryField operation, SecondaryField df,
uint32_t n,
2135 SrcType src, DstType dst);
2137 void GenInstrMsa3RF(SecondaryField operation,
uint32_t df, MSARegister wt,
2138 MSARegister ws, MSARegister wd);
2140 void GenInstrMsaVec(SecondaryField operation, MSARegister wt, MSARegister ws,
2143 void GenInstrMsaMI10(SecondaryField operation, int32_t s10, Register rs,
2146 void GenInstrMsa2R(SecondaryField operation, SecondaryField df,
2147 MSARegister ws, MSARegister wd);
2149 void GenInstrMsa2RF(SecondaryField operation, SecondaryField df,
2150 MSARegister ws, MSARegister wd);
2152 void GenInstrMsaBranch(SecondaryField operation, MSARegister wt,
2155 inline bool is_valid_msa_df_m(SecondaryField bit_df,
uint32_t m) {
2170 inline bool is_valid_msa_df_n(SecondaryField elm_df,
uint32_t n) {
2186 void print(
const Label* L);
2187 void bind_to(Label* L,
int pos);
2188 void next(Label* L,
bool is_internal);
2203 free_slot_count_ = 0;
2206 Trampoline(
int start,
int slot_count) {
2209 free_slot_count_ = slot_count;
2210 end_ = start + slot_count * kTrampolineSlotsSize;
2219 int trampoline_slot = kInvalidSlotPos;
2220 if (free_slot_count_ <= 0) {
2227 trampoline_slot = next_slot_;
2229 next_slot_ += kTrampolineSlotsSize;
2231 return trampoline_slot;
2238 int free_slot_count_;
2241 int32_t get_trampoline_entry(int32_t pos);
2242 int unbound_labels_count_;
2248 bool trampoline_emitted_;
2249 static constexpr
int kInvalidSlotPos = -1;
2253 std::set<int64_t> internal_reference_positions_;
2254 bool is_internal_reference(Label* L) {
2255 return internal_reference_positions_.find(L->pos()) !=
2256 internal_reference_positions_.end();
2259 void EmittedCompactBranchInstruction() { prev_instr_compact_branch_ =
true; }
2260 void ClearCompactBranchState() { prev_instr_compact_branch_ =
false; }
2261 bool prev_instr_compact_branch_ =
false;
2263 Trampoline trampoline_;
2264 bool internal_trampoline_exception_;
2266 RegList scratch_register_list_;
2269 void AllocateAndInstallRequestedHeapObjects(Isolate* isolate);
2271 friend class RegExpMacroAssemblerMIPS;
2272 friend class RelocInfo;
2273 friend class BlockTrampolinePoolScope;
2274 friend class EnsureSpace;
2279 explicit inline EnsureSpace(Assembler* assembler);
2282 class UseScratchRegisterScope {
2284 explicit UseScratchRegisterScope(Assembler* assembler);
2285 ~UseScratchRegisterScope();
2288 bool hasAvailable()
const;
2291 RegList* available_;
2292 RegList old_available_;
2296 DEFINE_REGISTER_NAMES(Register, GENERAL_REGISTERS)
2297 DEFINE_REGISTER_NAMES(FPURegister, DOUBLE_REGISTERS)
2298 DEFINE_REGISTER_NAMES(MSARegister, SIMD128_REGISTERS)
2303 #endif // V8_MIPS64_ASSEMBLER_MIPS64_H_