Lines Matching refs:rk
41 static inline bool IsZero(const Operand& rk) { in IsZero() argument
42 if (rk.is_reg()) { in IsZero()
43 return rk.rm() == zero_reg; in IsZero()
45 return rk.immediate() == 0; in IsZero()
343 void TurboAssembler::Add_w(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
344 if (rk.is_reg()) { in CallRecordWriteStub()
345 add_w(rd, rj, rk.rm()); in CallRecordWriteStub()
347 if (is_int12(rk.immediate()) && !MustUseReg(rk.rmode())) { in CallRecordWriteStub()
348 addi_w(rd, rj, static_cast<int32_t>(rk.immediate())); in CallRecordWriteStub()
354 li(scratch, rk); in CallRecordWriteStub()
360 void TurboAssembler::Add_d(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
361 if (rk.is_reg()) { in CallRecordWriteStub()
362 add_d(rd, rj, rk.rm()); in CallRecordWriteStub()
364 if (is_int12(rk.immediate()) && !MustUseReg(rk.rmode())) { in CallRecordWriteStub()
365 addi_d(rd, rj, static_cast<int32_t>(rk.immediate())); in CallRecordWriteStub()
371 li(scratch, rk); in CallRecordWriteStub()
377 void TurboAssembler::Sub_w(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
378 if (rk.is_reg()) { in CallRecordWriteStub()
379 sub_w(rd, rj, rk.rm()); in CallRecordWriteStub()
381 DCHECK(is_int32(rk.immediate())); in CallRecordWriteStub()
382 if (is_int12(-rk.immediate()) && !MustUseReg(rk.rmode())) { in CallRecordWriteStub()
384 addi_w(rd, rj, static_cast<int32_t>(-rk.immediate())); in CallRecordWriteStub()
389 if (-rk.immediate() >> 12 == 0 && !MustUseReg(rk.rmode())) { in CallRecordWriteStub()
391 li(scratch, -rk.immediate()); in CallRecordWriteStub()
395 li(scratch, rk); in CallRecordWriteStub()
402 void TurboAssembler::Sub_d(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
403 if (rk.is_reg()) { in CallRecordWriteStub()
404 sub_d(rd, rj, rk.rm()); in CallRecordWriteStub()
405 } else if (is_int12(-rk.immediate()) && !MustUseReg(rk.rmode())) { in CallRecordWriteStub()
407 addi_d(rd, rj, static_cast<int32_t>(-rk.immediate())); in CallRecordWriteStub()
410 int li_count = InstrCountForLi64Bit(rk.immediate()); in CallRecordWriteStub()
411 int li_neg_count = InstrCountForLi64Bit(-rk.immediate()); in CallRecordWriteStub()
412 if (li_neg_count < li_count && !MustUseReg(rk.rmode())) { in CallRecordWriteStub()
414 DCHECK(rk.immediate() != std::numeric_limits<int32_t>::min()); in CallRecordWriteStub()
417 li(scratch, Operand(-rk.immediate())); in CallRecordWriteStub()
423 li(scratch, rk); in CallRecordWriteStub()
429 void TurboAssembler::Mul_w(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
430 if (rk.is_reg()) { in CallRecordWriteStub()
431 mul_w(rd, rj, rk.rm()); in CallRecordWriteStub()
437 li(scratch, rk); in CallRecordWriteStub()
442 void TurboAssembler::Mulh_w(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
443 if (rk.is_reg()) { in CallRecordWriteStub()
444 mulh_w(rd, rj, rk.rm()); in CallRecordWriteStub()
450 li(scratch, rk); in CallRecordWriteStub()
455 void TurboAssembler::Mulh_wu(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
456 if (rk.is_reg()) { in CallRecordWriteStub()
457 mulh_wu(rd, rj, rk.rm()); in CallRecordWriteStub()
463 li(scratch, rk); in CallRecordWriteStub()
468 void TurboAssembler::Mul_d(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
469 if (rk.is_reg()) { in CallRecordWriteStub()
470 mul_d(rd, rj, rk.rm()); in CallRecordWriteStub()
476 li(scratch, rk); in CallRecordWriteStub()
481 void TurboAssembler::Mulh_d(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
482 if (rk.is_reg()) { in CallRecordWriteStub()
483 mulh_d(rd, rj, rk.rm()); in CallRecordWriteStub()
489 li(scratch, rk); in CallRecordWriteStub()
494 void TurboAssembler::Div_w(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
495 if (rk.is_reg()) { in CallRecordWriteStub()
496 div_w(rd, rj, rk.rm()); in CallRecordWriteStub()
502 li(scratch, rk); in CallRecordWriteStub()
507 void TurboAssembler::Mod_w(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
508 if (rk.is_reg()) { in CallRecordWriteStub()
509 mod_w(rd, rj, rk.rm()); in CallRecordWriteStub()
515 li(scratch, rk); in CallRecordWriteStub()
520 void TurboAssembler::Mod_wu(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
521 if (rk.is_reg()) { in CallRecordWriteStub()
522 mod_wu(rd, rj, rk.rm()); in CallRecordWriteStub()
528 li(scratch, rk); in CallRecordWriteStub()
533 void TurboAssembler::Div_d(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
534 if (rk.is_reg()) { in CallRecordWriteStub()
535 div_d(rd, rj, rk.rm()); in CallRecordWriteStub()
541 li(scratch, rk); in CallRecordWriteStub()
546 void TurboAssembler::Div_wu(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
547 if (rk.is_reg()) { in CallRecordWriteStub()
548 div_wu(rd, rj, rk.rm()); in CallRecordWriteStub()
554 li(scratch, rk); in CallRecordWriteStub()
559 void TurboAssembler::Div_du(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
560 if (rk.is_reg()) { in CallRecordWriteStub()
561 div_du(rd, rj, rk.rm()); in CallRecordWriteStub()
567 li(scratch, rk); in CallRecordWriteStub()
572 void TurboAssembler::Mod_d(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
573 if (rk.is_reg()) { in CallRecordWriteStub()
574 mod_d(rd, rj, rk.rm()); in CallRecordWriteStub()
580 li(scratch, rk); in CallRecordWriteStub()
585 void TurboAssembler::Mod_du(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
586 if (rk.is_reg()) { in CallRecordWriteStub()
587 mod_du(rd, rj, rk.rm()); in CallRecordWriteStub()
593 li(scratch, rk); in CallRecordWriteStub()
598 void TurboAssembler::And(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
599 if (rk.is_reg()) { in CallRecordWriteStub()
600 and_(rd, rj, rk.rm()); in CallRecordWriteStub()
602 if (is_uint12(rk.immediate()) && !MustUseReg(rk.rmode())) { in CallRecordWriteStub()
603 andi(rd, rj, static_cast<int32_t>(rk.immediate())); in CallRecordWriteStub()
609 li(scratch, rk); in CallRecordWriteStub()
615 void TurboAssembler::Or(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
616 if (rk.is_reg()) { in CallRecordWriteStub()
617 or_(rd, rj, rk.rm()); in CallRecordWriteStub()
619 if (is_uint12(rk.immediate()) && !MustUseReg(rk.rmode())) { in CallRecordWriteStub()
620 ori(rd, rj, static_cast<int32_t>(rk.immediate())); in CallRecordWriteStub()
626 li(scratch, rk); in CallRecordWriteStub()
632 void TurboAssembler::Xor(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
633 if (rk.is_reg()) { in CallRecordWriteStub()
634 xor_(rd, rj, rk.rm()); in CallRecordWriteStub()
636 if (is_uint12(rk.immediate()) && !MustUseReg(rk.rmode())) { in CallRecordWriteStub()
637 xori(rd, rj, static_cast<int32_t>(rk.immediate())); in CallRecordWriteStub()
643 li(scratch, rk); in CallRecordWriteStub()
649 void TurboAssembler::Nor(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
650 if (rk.is_reg()) { in CallRecordWriteStub()
651 nor(rd, rj, rk.rm()); in CallRecordWriteStub()
657 li(scratch, rk); in CallRecordWriteStub()
662 void TurboAssembler::Andn(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
663 if (rk.is_reg()) { in CallRecordWriteStub()
664 andn(rd, rj, rk.rm()); in CallRecordWriteStub()
670 li(scratch, rk); in CallRecordWriteStub()
675 void TurboAssembler::Orn(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
676 if (rk.is_reg()) { in CallRecordWriteStub()
677 orn(rd, rj, rk.rm()); in CallRecordWriteStub()
683 li(scratch, rk); in CallRecordWriteStub()
688 void TurboAssembler::Neg(Register rj, const Operand& rk) { in CallRecordWriteStub() argument
689 DCHECK(rk.is_reg()); in CallRecordWriteStub()
690 sub_d(rj, zero_reg, rk.rm()); in CallRecordWriteStub()
693 void TurboAssembler::Slt(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
694 if (rk.is_reg()) { in CallRecordWriteStub()
695 slt(rd, rj, rk.rm()); in CallRecordWriteStub()
697 if (is_int12(rk.immediate()) && !MustUseReg(rk.rmode())) { in CallRecordWriteStub()
698 slti(rd, rj, static_cast<int32_t>(rk.immediate())); in CallRecordWriteStub()
705 li(scratch, rk); in CallRecordWriteStub()
711 void TurboAssembler::Sltu(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
712 if (rk.is_reg()) { in CallRecordWriteStub()
713 sltu(rd, rj, rk.rm()); in CallRecordWriteStub()
715 if (is_int12(rk.immediate()) && !MustUseReg(rk.rmode())) { in CallRecordWriteStub()
716 sltui(rd, rj, static_cast<int32_t>(rk.immediate())); in CallRecordWriteStub()
723 li(scratch, rk); in CallRecordWriteStub()
729 void TurboAssembler::Sle(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
730 if (rk.is_reg()) { in CallRecordWriteStub()
731 slt(rd, rk.rm(), rj); in CallRecordWriteStub()
738 li(scratch, rk); in CallRecordWriteStub()
744 void TurboAssembler::Sleu(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
745 if (rk.is_reg()) { in CallRecordWriteStub()
746 sltu(rd, rk.rm(), rj); in CallRecordWriteStub()
753 li(scratch, rk); in CallRecordWriteStub()
759 void TurboAssembler::Sge(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
760 Slt(rd, rj, rk); in CallRecordWriteStub()
764 void TurboAssembler::Sgeu(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
765 Sltu(rd, rj, rk); in CallRecordWriteStub()
769 void TurboAssembler::Sgt(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
770 if (rk.is_reg()) { in CallRecordWriteStub()
771 slt(rd, rk.rm(), rj); in CallRecordWriteStub()
778 li(scratch, rk); in CallRecordWriteStub()
783 void TurboAssembler::Sgtu(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
784 if (rk.is_reg()) { in CallRecordWriteStub()
785 sltu(rd, rk.rm(), rj); in CallRecordWriteStub()
792 li(scratch, rk); in CallRecordWriteStub()
797 void TurboAssembler::Rotr_w(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
798 if (rk.is_reg()) { in CallRecordWriteStub()
799 rotr_w(rd, rj, rk.rm()); in CallRecordWriteStub()
801 int64_t ror_value = rk.immediate() % 32; in CallRecordWriteStub()
809 void TurboAssembler::Rotr_d(Register rd, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
810 if (rk.is_reg()) { in CallRecordWriteStub()
811 rotr_d(rd, rj, rk.rm()); in CallRecordWriteStub()
813 int64_t dror_value = rk.immediate() % 64; in CallRecordWriteStub()
819 void TurboAssembler::Alsl_w(Register rd, Register rj, Register rk, uint8_t sa, in CallRecordWriteStub() argument
823 alsl_w(rd, rj, rk, sa); in CallRecordWriteStub()
825 Register tmp = rd == rk ? scratch : rd; in CallRecordWriteStub()
826 DCHECK(tmp != rk); in CallRecordWriteStub()
828 add_w(rd, rk, tmp); in CallRecordWriteStub()
832 void TurboAssembler::Alsl_d(Register rd, Register rj, Register rk, uint8_t sa, in CallRecordWriteStub() argument
836 alsl_d(rd, rj, rk, sa); in CallRecordWriteStub()
838 Register tmp = rd == rk ? scratch : rd; in CallRecordWriteStub()
839 DCHECK(tmp != rk); in CallRecordWriteStub()
841 add_d(rd, rk, tmp); in CallRecordWriteStub()
1396 void TurboAssembler::Bstrpick_w(Register rk, Register rj, uint16_t msbw, in CallRecordWriteStub() argument
1401 bstrpick_w(rk, rj, msbw, lsbw); in CallRecordWriteStub()
1404 void TurboAssembler::Bstrpick_d(Register rk, Register rj, uint16_t msbw, in CallRecordWriteStub() argument
1409 bstrpick_d(rk, rj, msbw, lsbw); in CallRecordWriteStub()
1904 void TurboAssembler::Movz(Register rd, Register rj, Register rk) { in CallRecordWriteStub() argument
1907 masknez(scratch, rj, rk); in CallRecordWriteStub()
1908 maskeqz(rd, rd, rk); in CallRecordWriteStub()
1912 void TurboAssembler::Movn(Register rd, Register rj, Register rk) { in CallRecordWriteStub() argument
1915 maskeqz(scratch, rj, rk); in CallRecordWriteStub()
1916 masknez(rd, rd, rk); in CallRecordWriteStub()
1921 const Operand& rk, Condition cond) { in CallRecordWriteStub() argument
1929 if (rk.is_reg()) { in CallRecordWriteStub()
1930 LoadZeroIfConditionZero(rd, rk.rm()); in CallRecordWriteStub()
1931 } else if (rk.immediate() == 0) { in CallRecordWriteStub()
1934 } else if (IsZero(rk)) { in CallRecordWriteStub()
1937 Sub_d(t7, rj, rk); in CallRecordWriteStub()
1943 if (rk.is_reg()) { in CallRecordWriteStub()
1944 LoadZeroIfConditionNotZero(rd, rk.rm()); in CallRecordWriteStub()
1945 } else if (rk.immediate() != 0) { in CallRecordWriteStub()
1948 } else if (IsZero(rk)) { in CallRecordWriteStub()
1951 Sub_d(t7, rj, rk); in CallRecordWriteStub()
1958 Sgt(t7, rj, rk); in CallRecordWriteStub()
1962 Sge(t7, rj, rk); in CallRecordWriteStub()
1967 Slt(t7, rj, rk); in CallRecordWriteStub()
1972 Sle(t7, rj, rk); in CallRecordWriteStub()
1979 Sgtu(t7, rj, rk); in CallRecordWriteStub()
1985 Sgeu(t7, rj, rk); in CallRecordWriteStub()
1990 Sltu(t7, rj, rk); in CallRecordWriteStub()
1995 Sleu(t7, rj, rk); in CallRecordWriteStub()
2198 #define BRANCH_ARGS_CHECK(cond, rj, rk) \ in CallRecordWriteStub() argument
2199 DCHECK((cond == cc_always && rj == zero_reg && rk.rm() == zero_reg) || \ in CallRecordWriteStub()
2200 (cond != cc_always && (rj != zero_reg || rk.rm() != zero_reg))) in CallRecordWriteStub()
2212 const Operand& rk, bool need_link) { in CallRecordWriteStub() argument
2214 BRANCH_ARGS_CHECK(cond, rj, rk); in CallRecordWriteStub()
2215 if (!BranchShortOrFallback(L, cond, rj, rk, need_link)) { in CallRecordWriteStub()
2219 BranchShort(&skip, neg_cond, rj, rk, need_link); in CallRecordWriteStub()
2231 BranchShort(&skip, neg_cond, rj, rk, need_link); in CallRecordWriteStub()
2238 BranchShort(L, cond, rj, rk, need_link); in CallRecordWriteStub()
2255 Register TurboAssembler::GetRkAsRegisterHelper(const Operand& rk, in CallRecordWriteStub() argument
2258 if (rk.is_reg()) { in CallRecordWriteStub()
2259 r2 = rk.rm(); in CallRecordWriteStub()
2262 li(r2, rk); in CallRecordWriteStub()
2269 Register rj, const Operand& rk, in CallRecordWriteStub() argument
2293 if (rk.is_reg() && rj.code() == rk.rm().code()) { in CallRecordWriteStub()
2300 } else if (IsZero(rk)) { in CallRecordWriteStub()
2309 Register sc = GetRkAsRegisterHelper(rk, scratch); in CallRecordWriteStub()
2315 if (rk.is_reg() && rj.code() == rk.rm().code()) { in CallRecordWriteStub()
2322 } else if (IsZero(rk)) { in CallRecordWriteStub()
2331 Register sc = GetRkAsRegisterHelper(rk, scratch); in CallRecordWriteStub()
2340 if (rk.is_reg() && rj.code() == rk.rm().code()) { in CallRecordWriteStub()
2342 } else if (IsZero(rk)) { in CallRecordWriteStub()
2350 Register sc = GetRkAsRegisterHelper(rk, scratch); in CallRecordWriteStub()
2358 if (rk.is_reg() && rj.code() == rk.rm().code()) { in CallRecordWriteStub()
2363 } else if (IsZero(rk)) { in CallRecordWriteStub()
2371 Register sc = GetRkAsRegisterHelper(rk, scratch); in CallRecordWriteStub()
2379 if (rk.is_reg() && rj.code() == rk.rm().code()) { in CallRecordWriteStub()
2381 } else if (IsZero(rk)) { in CallRecordWriteStub()
2389 Register sc = GetRkAsRegisterHelper(rk, scratch); in CallRecordWriteStub()
2397 if (rk.is_reg() && rj.code() == rk.rm().code()) { in CallRecordWriteStub()
2402 } else if (IsZero(rk)) { in CallRecordWriteStub()
2410 Register sc = GetRkAsRegisterHelper(rk, scratch); in CallRecordWriteStub()
2420 if (rk.is_reg() && rj.code() == rk.rm().code()) { in CallRecordWriteStub()
2422 } else if (IsZero(rk)) { in CallRecordWriteStub()
2430 Register sc = GetRkAsRegisterHelper(rk, scratch); in CallRecordWriteStub()
2438 if (rk.is_reg() && rj.code() == rk.rm().code()) { in CallRecordWriteStub()
2443 } else if (IsZero(rk)) { in CallRecordWriteStub()
2451 Register sc = GetRkAsRegisterHelper(rk, scratch); in CallRecordWriteStub()
2459 if (rk.is_reg() && rj.code() == rk.rm().code()) { in CallRecordWriteStub()
2461 } else if (IsZero(rk)) { in CallRecordWriteStub()
2466 Register sc = GetRkAsRegisterHelper(rk, scratch); in CallRecordWriteStub()
2474 if (rk.is_reg() && rj.code() == rk.rm().code()) { in CallRecordWriteStub()
2479 } else if (IsZero(rk)) { in CallRecordWriteStub()
2486 Register sc = GetRkAsRegisterHelper(rk, scratch); in CallRecordWriteStub()
2500 const Operand& rk, bool need_link) { in CallRecordWriteStub() argument
2501 BRANCH_ARGS_CHECK(cond, rj, rk); in CallRecordWriteStub()
2502 bool result = BranchShortOrFallback(L, cond, rj, rk, need_link); in CallRecordWriteStub()
2531 const Operand& rk) { in CallRecordWriteStub() argument
2536 BRANCH_ARGS_CHECK(cond, rj, rk); in CallRecordWriteStub()
2538 Branch(&skip, NegateCondition(cond), rj, rk); in CallRecordWriteStub()
2545 Condition cond, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
2548 Branch(&skip, NegateCondition(cond), rj, rk); in CallRecordWriteStub()
2559 Register rj, const Operand& rk) { in CallRecordWriteStub() argument
2561 Jump(static_cast<intptr_t>(target), rmode, cond, rj, rk); in CallRecordWriteStub()
2565 Condition cond, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
2571 BranchShort(&skip, NegateCondition(cond), rj, rk); in CallRecordWriteStub()
2598 Jump(t7, cc_always, rj, rk); in CallRecordWriteStub()
2604 Jump(static_cast<intptr_t>(code.address()), rmode, cc_always, rj, rk); in CallRecordWriteStub()
2615 const Operand& rk) { in CallRecordWriteStub() argument
2620 BRANCH_ARGS_CHECK(cond, rj, rk); in CallRecordWriteStub()
2622 Branch(&skip, NegateCondition(cond), rj, rk); in CallRecordWriteStub()
2644 Register rj, const Operand& rk) { in CallRecordWriteStub() argument
2648 BranchShort(&skip, NegateCondition(cond), rj, rk); in CallRecordWriteStub()
2658 Call(t7, cc_always, rj, rk); in CallRecordWriteStub()
2664 Condition cond, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
2668 BranchShort(&skip, NegateCondition(cond), rj, rk); in CallRecordWriteStub()
2699 Call(t7, cond, rj, rk); in CallRecordWriteStub()
2707 Call(code.address(), rmode, cc_always, rj, rk); in CallRecordWriteStub()
2827 void TurboAssembler::Ret(Condition cond, Register rj, const Operand& rk) { in CallRecordWriteStub() argument
2828 Jump(ra, cond, rj, rk); in CallRecordWriteStub()
3383 Operand rk) { in CallRecordWriteStub() argument
3384 if (FLAG_debug_code) Check(cc, reason, rs, rk); in CallRecordWriteStub()
3388 Operand rk) { in CallRecordWriteStub() argument
3390 Branch(&L, cc, rj, rk); in CallRecordWriteStub()