40#ifndef V8_CODEGEN_S390_ASSEMBLER_S390_H_
41#define V8_CODEGEN_S390_ASSEMBLER_S390_H_
45#if V8_HOST_ARCH_S390X && !V8_OS_ZOS
65class SafepointTableBuilder;
78 value_.immediate = immediate;
87 value_.immediate =
static_cast<intptr_t
>(value.ptr());
102 DCHECK(!is_heap_number_request());
107 DCHECK(is_heap_number_request());
108 return value_.heap_number_request;
113 (
static_cast<uint32_t
>(
value_.immediate) << (32 -
n)) >> (32 - n);
121 rmode_ == RelocInfo::FULL_EMBEDDED_OBJECT ||
122 rmode_ == RelocInfo::CODE_TARGET);
123 return is_heap_number_request_;
135 bool is_heap_number_request_ =
false;
169 return indexRegister;
207 std::unique_ptr<AssemblerBuffer> = {});
210 std::unique_ptr<AssemblerBuffer> buffer = {})
215 static RegList DefaultTmpList();
219 static constexpr int kNoHandlerTable = 0;
223 int handler_table_offset);
229 GetCode(isolate, desc, kNoSafepointTable, kNoHandlerTable);
269 Address constant_pool);
271 Address
pc, Address constant_pool, Address target,
276 Address
pc, Address constant_pool,
Tagged_t target,
282 Address
pc, Address constant_pool);
286 Address instruction_payload);
296 Address
pc, Address constant_pool, uint32_t new_constant,
306 static constexpr int kSpecialTargetSize = 0;
308 static constexpr int kBytesForPtrConstant = 12;
312 return &scratch_double_register_list_;
318 template <
class T,
int size,
int lo,
int hi>
323 int shift = size * 8 -
hi;
324 uint32_t mask_value = (
mask == 32) ? 0xffffffff : (1 <<
mask) - 1;
325 return (value & mask_value) << shift;
328#define DECLARE_S390_RIL_AB_INSTRUCTIONS(name, op_name, op_value) \
329 template <class R1> \
330 inline void name(R1 r1, const Operand& i2) { \
331 ril_format(op_name, r1.code(), i2.immediate()); \
333#define DECLARE_S390_RIL_C_INSTRUCTIONS(name, op_name, op_value) \
334 inline void name(Condition m1, const Operand& i2) { \
335 ril_format(op_name, m1, i2.immediate()); \
339 uint32_t op1 = opcode >> 4;
340 uint32_t op2 = opcode & 0xf;
342 getfield<uint64_t, 6, 0, 8>(op1) | getfield<uint64_t, 6, 8, 12>(f1) |
343 getfield<uint64_t, 6, 12, 16>(op2) | getfield<uint64_t, 6, 16, 48>(f2));
348#undef DECLARE_S390_RIL_AB_INSTRUCTIONS
349#undef DECLARE_S390_RIL_C_INSTRUCTIONS
351#define DECLARE_S390_RR_INSTRUCTIONS(name, op_name, op_value) \
352 inline void name(Register r1, Register r2) { \
353 rr_format(op_name, r1.code(), r2.code()); \
355 inline void name(DoubleRegister r1, DoubleRegister r2) { \
356 rr_format(op_name, r1.code(), r2.code()); \
358 inline void name(Condition m1, Register r2) { \
359 rr_format(op_name, m1, r2.code()); \
363 emit2bytes(getfield<uint16_t, 2, 0, 8>(opcode) |
364 getfield<uint16_t, 2, 8, 12>(f1) |
365 getfield<uint16_t, 2, 12, 16>(f2));
368#undef DECLARE_S390_RR_INSTRUCTIONS
370#define DECLARE_S390_RRD_INSTRUCTIONS(name, op_name, op_value) \
371 template <class R1, class R2, class R3> \
372 inline void name(R1 r1, R3 r3, R2 r2) { \
373 rrd_format(op_name, r1.code(), r3.code(), r2.code()); \
376 emit4bytes(getfield<uint32_t, 4, 0, 16>(opcode) |
377 getfield<uint32_t, 4, 16, 20>(f1) |
378 getfield<uint32_t, 4, 24, 28>(f2) |
379 getfield<uint32_t, 4, 28, 32>(f3));
382#undef DECLARE_S390_RRD_INSTRUCTIONS
384#define DECLARE_S390_RRE_INSTRUCTIONS(name, op_name, op_value) \
385 template <class R1, class R2> \
386 inline void name(R1 r1, R2 r2) { \
387 rre_format(op_name, r1.code(), r2.code()); \
390 emit4bytes(getfield<uint32_t, 4, 0, 16>(opcode) |
391 getfield<uint32_t, 4, 24, 28>(f1) |
392 getfield<uint32_t, 4, 28, 32>(f2));
398#undef DECLARE_S390_RRE_INSTRUCTIONS
400#define DECLARE_S390_RX_INSTRUCTIONS(name, op_name, op_value) \
401 template <class R1> \
402 inline void name(R1 r1, Register x2, Register b2, const Operand& d2) { \
403 rx_format(op_name, r1.code(), x2.code(), b2.code(), d2.immediate()); \
405 template <class R1> \
406 inline void name(R1 r1, const MemOperand& opnd) { \
407 name(r1, opnd.getIndexRegister(), opnd.getBaseRegister(), \
408 Operand(opnd.getDisplacement())); \
415 getfield<uint32_t, 4, 0, 8>(opcode) | getfield<uint32_t, 4, 8, 12>(f1) |
416 getfield<uint32_t, 4, 12, 16>(f2) | getfield<uint32_t, 4, 16, 20>(f3) |
417 getfield<uint32_t, 4, 20, 32>(f4));
422 bc(cond, opnd.getIndexRegister(), opnd.getBaseRegister(),
423 Operand(opnd.getDisplacement()));
428#undef DECLARE_S390_RX_INSTRUCTIONS
430#define DECLARE_S390_RXY_INSTRUCTIONS(name, op_name, op_value) \
431 template <class R1, class R2> \
432 inline void name(R1 r1, R2 r2, Register b2, const Operand& d2) { \
433 rxy_format(op_name, r1.code(), r2.code(), b2.code(), d2.immediate()); \
435 template <class R1> \
436 inline void name(R1 r1, const MemOperand& opnd) { \
437 name(r1, opnd.getIndexRegister(), opnd.getBaseRegister(), \
438 Operand(opnd.getDisplacement())); \
442 DCHECK(is_uint16(opcode));
444 emit6bytes(getfield<uint64_t, 6, 0, 8>(opcode >> 8) |
445 getfield<uint64_t, 6, 8, 12>(f1) |
446 getfield<uint64_t, 6, 12, 16>(f2) |
447 getfield<uint64_t, 6, 16, 20>(f3) |
448 getfield<uint64_t, 6, 20, 32>(f4 & 0x0fff) |
449 getfield<uint64_t, 6, 32, 40>(f4 >> 12) |
450 getfield<uint64_t, 6, 40, 48>(opcode & 0x00ff));
455 pfd(cond, opnd.getIndexRegister(), opnd.getBaseRegister(),
456 Operand(opnd.getDisplacement()));
461#undef DECLARE_S390_RXY_INSTRUCTIONS
467 (getfield<uint64_t, 6, 0, 8>(op >> 8) |
468 getfield<uint64_t, 6, 8, 12>(f1) | getfield<uint64_t, 6, 12, 16>(f2) |
469 getfield<uint64_t, 6, 16, 20>(f3) |
470 getfield<uint64_t, 6, 20, 32>(f4 & 0x0fff) |
471 getfield<uint64_t, 6, 32, 40>(f4 >> 12) |
472 getfield<uint64_t, 6, 40, 48>(op & 0xff));
476#define DECLARE_S390_RSY_A_INSTRUCTIONS(name, op_name, op_value) \
477 void name(Register r1, Register r3, Register b2, \
478 const Operand& d2 = Operand::Zero()) { \
479 rsy_format(op_name, r1.code(), r3.code(), b2.code(), d2.immediate()); \
481 void name(Register r1, Register r3, Operand d2) { name(r1, r3, r0, d2); } \
482 void name(Register r1, Register r3, const MemOperand& opnd) { \
483 name(r1, r3, opnd.getBaseRegister(), Operand(opnd.getDisplacement())); \
486#undef DECLARE_S390_RSY_A_INSTRUCTIONS
488#define DECLARE_S390_RSY_B_INSTRUCTIONS(name, op_name, op_value) \
489 void name(Register r1, Condition m3, Register b2, const Operand& d2) { \
490 rsy_format(op_name, r1.code(), m3, b2.code(), d2.immediate()); \
492 void name(Register r1, Condition m3, const MemOperand& opnd) { \
493 name(r1, m3, opnd.getBaseRegister(), Operand(opnd.getDisplacement())); \
496#undef DECLARE_S390_RSY_B_INSTRUCTIONS
500 getfield<uint32_t, 4, 0, 8>(op) | getfield<uint32_t, 4, 8, 12>(f1) |
501 getfield<uint32_t, 4, 12, 16>(f2) | getfield<uint32_t, 4, 16, 20>(f3) |
502 getfield<uint32_t, 4, 20, 32>(f4);
506#define DECLARE_S390_RS_A_INSTRUCTIONS(name, op_name, op_value) \
507 void name(Register r1, Register r3, Register b2, const Operand& d2) { \
508 rs_format(op_name, r1.code(), r3.code(), b2.code(), d2.immediate()); \
510 void name(Register r1, Register r3, const MemOperand& opnd) { \
511 name(r1, r3, opnd.getBaseRegister(), Operand(opnd.getDisplacement())); \
514#undef DECLARE_S390_RS_A_INSTRUCTIONS
516#define DECLARE_S390_RS_B_INSTRUCTIONS(name, op_name, op_value) \
517 void name(Register r1, Condition m3, Register b2, const Operand& d2) { \
518 rs_format(op_name, r1.code(), m3, b2.code(), d2.immediate()); \
520 void name(Register r1, Condition m3, const MemOperand& opnd) { \
521 name(r1, m3, opnd.getBaseRegister(), Operand(opnd.getDisplacement())); \
524#undef DECLARE_S390_RS_B_INSTRUCTIONS
526#define DECLARE_S390_RS_SHIFT_FORMAT(name, opcode) \
527 void name(Register r1, Register r2, const Operand& opnd = Operand::Zero()) { \
528 rs_format(opcode, r1.code(), r0.code(), r2.code(), opnd.immediate()); \
530 void name(Register r1, const Operand& opnd) { \
531 rs_format(opcode, r1.code(), r0.code(), r0.code(), opnd.immediate()); \
540#undef DECLARE_S390_RS_SHIFT_FORMAT
547 (getfield<uint64_t, 6, 0, 8>(op >> 8) |
548 getfield<uint64_t, 6, 8, 12>(f1) | getfield<uint64_t, 6, 12, 16>(f2) |
549 getfield<uint64_t, 6, 16, 20>(f3) |
550 getfield<uint64_t, 6, 20, 32>(f4 & 0x0fff) |
551 getfield<uint64_t, 6, 32, 36>(f5) |
552 getfield<uint64_t, 6, 40, 48>(op & 0xff));
556#define DECLARE_S390_RXE_INSTRUCTIONS(name, op_name, op_value) \
557 void name(Register r1, Register x2, Register b2, const Operand& d2, \
558 Condition m3 = static_cast<Condition>(0)) { \
559 rxe_format(op_name, r1.code(), x2.code(), b2.code(), d2.immediate(), m3); \
561 template <class _R1Type> \
562 void name(_R1Type r1, const MemOperand& opnd) { \
563 name(Register::from_code(r1.code()), opnd.rx(), opnd.rb(), \
564 Operand(opnd.offset())); \
567#undef DECLARE_S390_RXE_INSTRUCTIONS
570 uint32_t op1 = opcode >> 4;
571 uint32_t op2 = opcode & 0xf;
573 getfield<uint32_t, 4, 0, 8>(op1) | getfield<uint32_t, 4, 8, 12>(f1) |
574 getfield<uint32_t, 4, 12, 16>(op2) | getfield<uint32_t, 4, 16, 32>(f2));
577#define DECLARE_S390_RI_A_INSTRUCTIONS(name, op_name, op_value) \
578 void name(Register r, const Operand& i2) { \
579 DCHECK(is_uint12(op_name)); \
580 DCHECK(is_uint16(i2.immediate()) || is_int16(i2.immediate())); \
581 ri_format(op_name, r.code(), i2.immediate()); \
584#undef DECLARE_S390_RI_A_INSTRUCTIONS
586#define DECLARE_S390_RI_B_INSTRUCTIONS(name, op_name, op_value) \
587 void name(Register r1, const Operand& imm) { \
589 int16_t numHalfwords = static_cast<int16_t>(imm.immediate()) / 2; \
590 Operand halfwordOp = Operand(numHalfwords); \
591 halfwordOp.setBits(16); \
592 ri_format(op_name, r1.code(), halfwordOp.immediate()); \
595#undef DECLARE_S390_RI_B_INSTRUCTIONS
597#define DECLARE_S390_RI_C_INSTRUCTIONS(name, op_name, op_value) \
598 void name(Condition m, const Operand& i2) { \
599 DCHECK(is_uint12(op_name)); \
600 DCHECK(is_uint4(m)); \
601 DCHECK(op_name == BRC ? is_int16(i2.immediate()) \
602 : is_uint16(i2.immediate())); \
603 ri_format(op_name, m, i2.immediate()); \
606#undef DECLARE_S390_RI_C_INSTRUCTIONS
610 getfield<uint32_t, 4, 0, 16>(op) | getfield<uint32_t, 4, 16, 20>(f1) |
611 getfield<uint32_t, 4, 20, 24>(f2) | getfield<uint32_t, 4, 24, 28>(f3) |
612 getfield<uint32_t, 4, 28, 32>(f4);
616#define DECLARE_S390_RRF_A_INSTRUCTIONS(name, op_name, op_value) \
617 void name(Register r1, Condition m4, Register r2, Register r3) { \
618 rrf_format(op_name, r3.code(), m4, r1.code(), r2.code()); \
620 void name(Register r1, Register r2, Register r3) { \
621 name(r1, Condition(0), r2, r3); \
624#undef DECLARE_S390_RRF_A_INSTRUCTIONS
626#define DECLARE_S390_RRF_B_INSTRUCTIONS(name, op_name, op_value) \
627 void name(Register r1, Condition m4, Register r2, Register r3) { \
628 rrf_format(op_name, r3.code(), m4, r1.code(), r2.code()); \
630 void name(Register r1, Register r2, Register r3) { \
631 name(r1, Condition(0), r2, r3); \
634#undef DECLARE_S390_RRF_B_INSTRUCTIONS
636#define DECLARE_S390_RRF_C_INSTRUCTIONS(name, op_name, op_value) \
637 template <class R1, class R2> \
638 void name(Condition m3, Condition m4, R1 r1, R2 r2) { \
639 rrf_format(op_name, m3, m4, r1.code(), r2.code()); \
641 template <class R1, class R2> \
642 void name(Condition m3, R1 r1, R2 r2) { \
643 name(m3, Condition(0), r1, r2); \
646#undef DECLARE_S390_RRF_C_INSTRUCTIONS
648#define DECLARE_S390_RRF_D_INSTRUCTIONS(name, op_name, op_value) \
649 template <class R1, class R2> \
650 void name(Condition m3, Condition m4, R1 r1, R2 r2) { \
651 rrf_format(op_name, m3, m4, r1.code(), r2.code()); \
653 template <class R1, class R2> \
654 void name(Condition m3, R1 r1, R2 r2) { \
655 name(m3, Condition(0), r1, r2); \
658#undef DECLARE_S390_RRF_D_INSTRUCTIONS
660#define DECLARE_S390_RRF_E_INSTRUCTIONS(name, op_name, op_value) \
661 template <class M3, class M4, class R1, class R2> \
662 void name(M3 m3, M4 m4, R1 r1, R2 r2) { \
663 rrf_format(op_name, m3, m4, r1.code(), r2.code()); \
665 template <class M3, class R1, class R2> \
666 void name(M3 m3, R1 r1, R2 r2) { \
667 name(m3, Condition(0), r1, r2); \
670#undef DECLARE_S390_RRF_E_INSTRUCTIONS
674 DCHECK(is_uint16(f3) || is_int16(f3));
676 getfield<uint32_t, 4, 0, 8>(op) | getfield<uint32_t, 4, 8, 12>(f1) |
677 getfield<uint32_t, 4, 12, 16>(f2) | getfield<uint32_t, 4, 16, 32>(f3);
681#define DECLARE_S390_RSI_INSTRUCTIONS(name, op_name, op_value) \
682 void name(Register r1, Register r3, const Operand& i2) { \
683 rsi_format(op_name, r1.code(), r3.code(), i2.immediate()); \
686#undef DECLARE_S390_RSI_INSTRUCTIONS
692 getfield<uint64_t, 6, 0, 8>(op >> 8) |
693 getfield<uint64_t, 6, 8, 16>(f1) | getfield<uint64_t, 6, 16, 20>(f2) |
694 getfield<uint64_t, 6, 20, 32>(f3) | getfield<uint64_t, 6, 32, 36>(f4) |
695 getfield<uint64_t, 6, 36, 40>(f5) |
696 getfield<uint64_t, 6, 40, 48>(op & 0x00FF);
700#define DECLARE_S390_RSL_A_INSTRUCTIONS(name, op_name, op_value) \
701 void name(const Operand& l1, Register b1, const Operand& d1) { \
702 uint16_t L = static_cast<uint16_t>(l1.immediate() << 8); \
703 rsl_format(op_name, L, b1.code(), d1.immediate(), 0, 0); \
706#undef DECLARE_S390_RSL_A_INSTRUCTIONS
708#define DECLARE_S390_RSL_B_INSTRUCTIONS(name, op_name, op_value) \
709 void name(const Operand& l2, Register b2, const Operand& d2, Register r1, \
711 uint16_t L = static_cast<uint16_t>(l2.immediate()); \
712 rsl_format(op_name, L, b2.code(), d2.immediate(), r1.code(), m3); \
715#undef DECLARE_S390_RSL_B_INSTRUCTIONS
720 uint32_t code = getfield<uint32_t, 4, 0, 16>(op) |
721 getfield<uint32_t, 4, 16, 20>(f1) |
722 getfield<uint32_t, 4, 20, 32>(f2);
726#define DECLARE_S390_S_INSTRUCTIONS(name, op_name, op_value) \
727 void name(Register b1, const Operand& d2) { \
728 Opcode op = op_name; \
729 if ((op & 0xFF00) == 0) { \
730 op = (Opcode)(op << 8); \
732 s_format(op, b1.code(), d2.immediate()); \
734 void name(const MemOperand& opnd) { \
735 Operand d2 = Operand(opnd.getDisplacement()); \
736 name(opnd.getBaseRegister(), d2); \
739#undef DECLARE_S390_S_INSTRUCTIONS
743 getfield<uint32_t, 4, 0, 8>(op) | getfield<uint32_t, 4, 8, 16>(f1) |
744 getfield<uint32_t, 4, 16, 20>(f2) | getfield<uint32_t, 4, 20, 32>(f3);
748#define DECLARE_S390_SI_INSTRUCTIONS(name, op_name, op_value) \
749 void name(const Operand& i2, Register b1, const Operand& d1) { \
750 si_format(op_name, i2.immediate(), b1.code(), d1.immediate()); \
752 void name(const MemOperand& opnd, const Operand& i2) { \
753 name(i2, opnd.getBaseRegister(), Operand(opnd.getDisplacement())); \
756#undef DECLARE_S390_SI_INSTRUCTIONS
759 DCHECK(is_uint20(f3) || is_int20(f3));
761 DCHECK(is_uint8(f1) || is_int8(f1));
762 uint64_t code = getfield<uint64_t, 6, 0, 8>(op >> 8) |
763 getfield<uint64_t, 6, 8, 16>(f1) |
764 getfield<uint64_t, 6, 16, 20>(f2) |
765 getfield<uint64_t, 6, 20, 32>(f3) |
766 getfield<uint64_t, 6, 32, 40>(f3 >> 12) |
767 getfield<uint64_t, 6, 40, 48>(op & 0x00FF);
771#define DECLARE_S390_SIY_INSTRUCTIONS(name, op_name, op_value) \
772 void name(const Operand& i2, Register b1, const Operand& d1) { \
773 siy_format(op_name, i2.immediate(), b1.code(), d1.immediate()); \
775 void name(const MemOperand& opnd, const Operand& i2) { \
776 name(i2, opnd.getBaseRegister(), Operand(opnd.getDisplacement())); \
779#undef DECLARE_S390_SIY_INSTRUCTIONS
785 getfield<uint64_t, 6, 0, 8>(op >> 8) |
786 getfield<uint64_t, 6, 8, 12>(f1) | getfield<uint64_t, 6, 12, 16>(f2) |
787 getfield<uint64_t, 6, 16, 20>(f3) | getfield<uint64_t, 6, 20, 32>(f4) |
788 getfield<uint64_t, 6, 32, 36>(f5) |
789 getfield<uint64_t, 6, 40, 48>(op & 0x00FF);
793#define DECLARE_S390_RRS_INSTRUCTIONS(name, op_name, op_value) \
794 void name(Register r1, Register r2, Register b4, const Operand& d4, \
796 rrs_format(op_name, r1.code(), r2.code(), b4.code(), d4.immediate(), m3); \
798 void name(Register r1, Register r2, Condition m3, const MemOperand& opnd) { \
799 name(r1, r2, opnd.getBaseRegister(), Operand(opnd.getDisplacement()), m3); \
802#undef DECLARE_S390_RRS_INSTRUCTIONS
809 getfield<uint64_t, 6, 0, 8>(op >> 8) |
810 getfield<uint64_t, 6, 8, 12>(f1) | getfield<uint64_t, 6, 12, 16>(f2) |
811 getfield<uint64_t, 6, 16, 20>(f3) | getfield<uint64_t, 6, 20, 32>(f4) |
812 getfield<uint64_t, 6, 32, 40>(f5) |
813 getfield<uint64_t, 6, 40, 48>(op & 0x00FF);
817#define DECLARE_S390_RIS_INSTRUCTIONS(name, op_name, op_value) \
818 void name(Register r1, Condition m3, Register b4, const Operand& d4, \
819 const Operand& i2) { \
820 ris_format(op_name, r1.code(), m3, b4.code(), d4.immediate(), \
823 void name(Register r1, const Operand& i2, Condition m3, \
824 const MemOperand& opnd) { \
825 name(r1, m3, opnd.getBaseRegister(), Operand(opnd.getDisplacement()), i2); \
828#undef DECLARE_S390_RIS_INSTRUCTIONS
835 getfield<uint64_t, 6, 0, 16>(op) | getfield<uint64_t, 6, 16, 20>(f1) |
836 getfield<uint64_t, 6, 20, 32>(f2) | getfield<uint64_t, 6, 32, 48>(f3);
840#define DECLARE_S390_SIL_INSTRUCTIONS(name, op_name, op_value) \
841 void name(Register b1, const Operand& d1, const Operand& i2) { \
842 sil_format(op_name, b1.code(), d1.immediate(), i2.immediate()); \
844 void name(const MemOperand& opnd, const Operand& i2) { \
845 name(opnd.getBaseRegister(), Operand(opnd.getDisplacement()), i2); \
848#undef DECLARE_S390_SIL_INSTRUCTIONS
851 uint32_t op1 = opcode >> 8;
852 uint32_t op2 = opcode & 0xff;
854 getfield<uint64_t, 6, 0, 8>(op1) | getfield<uint64_t, 6, 8, 12>(f1) |
855 getfield<uint64_t, 6, 12, 16>(f2) | getfield<uint64_t, 6, 16, 32>(f3) |
856 getfield<uint64_t, 6, 32, 40>(f4) | getfield<uint64_t, 6, 40, 48>(op2);
860#define DECLARE_S390_RIE_D_INSTRUCTIONS(name, op_name, op_value) \
861 void name(Register r1, Register r3, const Operand& i2) { \
862 rie_d_format(op_name, r1.code(), r3.code(), i2.immediate(), 0); \
865#undef DECLARE_S390_RIE_D_INSTRUCTIONS
868 uint32_t op1 = opcode >> 8;
869 uint32_t op2 = opcode & 0xff;
871 getfield<uint64_t, 6, 0, 8>(op1) | getfield<uint64_t, 6, 8, 12>(f1) |
872 getfield<uint64_t, 6, 12, 16>(f2) | getfield<uint64_t, 6, 16, 32>(f3) |
873 getfield<uint64_t, 6, 40, 48>(op2);
877#define DECLARE_S390_RIE_E_INSTRUCTIONS(name, op_name, op_value) \
878 void name(Register r1, Register r3, const Operand& i2) { \
879 rie_e_format(op_name, r1.code(), r3.code(), i2.immediate()); \
882#undef DECLARE_S390_RIE_E_INSTRUCTIONS
886 uint32_t op1 = opcode >> 8;
887 uint32_t op2 = opcode & 0xff;
889 getfield<uint64_t, 6, 0, 8>(op1) | getfield<uint64_t, 6, 8, 12>(f1) |
890 getfield<uint64_t, 6, 12, 16>(f2) | getfield<uint64_t, 6, 16, 24>(f3) |
891 getfield<uint64_t, 6, 24, 32>(f4) | getfield<uint64_t, 6, 32, 40>(f5) |
892 getfield<uint64_t, 6, 40, 48>(op2);
896#define DECLARE_S390_RIE_F_INSTRUCTIONS(name, op_name, op_value) \
897 void name(Register dst, Register src, const Operand& startBit, \
898 const Operand& endBit, const Operand& shiftAmt) { \
899 DCHECK(is_uint8(startBit.immediate())); \
900 DCHECK(is_uint8(endBit.immediate())); \
901 DCHECK(is_uint8(shiftAmt.immediate())); \
902 rie_f_format(op_name, dst.code(), src.code(), startBit.immediate(), \
903 endBit.immediate(), shiftAmt.immediate()); \
906#undef DECLARE_S390_RIE_F_INSTRUCTIONS
914 getfield<uint64_t, 6, 0, 8>(op) | getfield<uint64_t, 6, 8, 16>(f1) |
915 getfield<uint64_t, 6, 16, 20>(f2) | getfield<uint64_t, 6, 20, 32>(f3) |
916 getfield<uint64_t, 6, 32, 36>(f4) | getfield<uint64_t, 6, 36, 48>(f5);
920#define DECLARE_S390_SS_A_INSTRUCTIONS(name, op_name, op_value) \
921 void name(Register b1, const Operand& d1, Register b2, const Operand& d2, \
922 const Operand& length) { \
923 ss_a_format(op_name, length.immediate(), b1.code(), d1.immediate(), \
924 b2.code(), d2.immediate()); \
926 void name(const MemOperand& opnd1, const MemOperand& opnd2, \
927 const Operand& length) { \
928 ss_a_format(op_name, length.immediate(), opnd1.getBaseRegister().code(), \
929 opnd1.getDisplacement(), opnd2.getBaseRegister().code(), \
930 opnd2.getDisplacement()); \
933#undef DECLARE_S390_SS_A_INSTRUCTIONS
937 int32_t halfwords = branch_offset(l) / 2;
943 bool force_long_branch =
false);
947 bool force_long_branch =
false) {
948 branchOnCond(cond, branch_offset(l),
949 l->is_bound() || (dist == Label::kNear), force_long_branch);
953 b(cond, l, Label::kNear);
987 int offset_halfwords = branch_offset(
L) / 2;
988 CHECK(is_int16(offset_halfwords));
989 brxh(dst, inc,
Operand(offset_halfwords));
993 int offset_halfwords = branch_offset(
L) / 2;
994 CHECK(is_int16(offset_halfwords));
995 brxhg(dst, inc,
Operand(offset_halfwords));
998 template <
class R1,
class R2>
1003 template <
class R1,
class R2>
1008 template <
class R1,
class R2>
1013 template <
class R1,
class R2>
1018 template <
class R1,
class R2>
1023 template <
class R1,
class R2>
1028 template <
class R1,
class R2>
1033 template <
class R1,
class R2>
1054 PrintF(
"DebugBreak is inserted to %p\n",
static_cast<void*
>(
pc_));
1056#if V8_HOST_ARCH_64_BIT
1058 int32_t hi_32 =
static_cast<int64_t
>(
value) >> 32;
1059 int32_t lo_32 =
static_cast<int32_t
>(
value);
1073#define DECLARE_VRR_A_INSTRUCTIONS(name, opcode_name, opcode_value) \
1074 void name(DoubleRegister v1, DoubleRegister v2, Condition m5, Condition m4, \
1076 uint64_t code = (static_cast<uint64_t>(opcode_value & 0xFF00)) * B32 | \
1077 (static_cast<uint64_t>(v1.code())) * B36 | \
1078 (static_cast<uint64_t>(v2.code())) * B32 | \
1079 (static_cast<uint64_t>(m5 & 0xF)) * B20 | \
1080 (static_cast<uint64_t>(m4 & 0xF)) * B16 | \
1081 (static_cast<uint64_t>(m3 & 0xF)) * B12 | \
1082 (static_cast<uint64_t>(0)) * B8 | \
1083 (static_cast<uint64_t>(opcode_value & 0x00FF)); \
1087#undef DECLARE_VRR_A_INSTRUCTIONS
1089#define DECLARE_VRR_C_INSTRUCTIONS(name, opcode_name, opcode_value) \
1090 void name(DoubleRegister v1, DoubleRegister v2, DoubleRegister v3, \
1091 Condition m6, Condition m5, Condition m4) { \
1092 uint64_t code = (static_cast<uint64_t>(opcode_value & 0xFF00)) * B32 | \
1093 (static_cast<uint64_t>(v1.code())) * B36 | \
1094 (static_cast<uint64_t>(v2.code())) * B32 | \
1095 (static_cast<uint64_t>(v3.code())) * B28 | \
1096 (static_cast<uint64_t>(m6 & 0xF)) * B20 | \
1097 (static_cast<uint64_t>(m5 & 0xF)) * B16 | \
1098 (static_cast<uint64_t>(m4 & 0xF)) * B12 | \
1099 (static_cast<uint64_t>(0)) * B8 | \
1100 (static_cast<uint64_t>(opcode_value & 0x00FF)); \
1104#undef DECLARE_VRR_C_INSTRUCTIONS
1106#define DECLARE_VRR_B_INSTRUCTIONS(name, opcode_name, opcode_value) \
1107 void name(DoubleRegister v1, DoubleRegister v2, DoubleRegister v3, \
1108 Condition m5, Condition m4) { \
1109 uint64_t code = (static_cast<uint64_t>(opcode_value & 0xFF00)) * B32 | \
1110 (static_cast<uint64_t>(v1.code())) * B36 | \
1111 (static_cast<uint64_t>(v2.code())) * B32 | \
1112 (static_cast<uint64_t>(v3.code())) * B28 | \
1113 (static_cast<uint64_t>(m5 & 0xF)) * B20 | \
1114 (static_cast<uint64_t>(m4 & 0xF)) * B12 | \
1115 (static_cast<uint64_t>(0)) * B8 | \
1116 (static_cast<uint64_t>(opcode_value & 0x00FF)); \
1120#undef DECLARE_VRR_B_INSTRUCTIONS
1122#define DECLARE_VRR_E_INSTRUCTIONS(name, opcode_name, opcode_value) \
1123 void name(DoubleRegister v1, DoubleRegister v2, DoubleRegister v3, \
1124 DoubleRegister v4, Condition m6, Condition m5) { \
1125 uint64_t code = (static_cast<uint64_t>(opcode_value & 0xFF00)) * B32 | \
1126 (static_cast<uint64_t>(v1.code())) * B36 | \
1127 (static_cast<uint64_t>(v2.code())) * B32 | \
1128 (static_cast<uint64_t>(v3.code())) * B28 | \
1129 (static_cast<uint64_t>(m6 & 0xF)) * B24 | \
1130 (static_cast<uint64_t>(m5 & 0xF)) * B16 | \
1131 (static_cast<uint64_t>(v4.code())) * B12 | \
1132 (static_cast<uint64_t>(0)) * B8 | \
1133 (static_cast<uint64_t>(opcode_value & 0x00FF)); \
1137#undef DECLARE_VRR_E_INSTRUCTIONS
1139#define DECLARE_VRR_F_INSTRUCTIONS(name, opcode_name, opcode_value) \
1140 void name(DoubleRegister v1, Register r1, Register r2) { \
1141 uint64_t code = (static_cast<uint64_t>(opcode_value & 0xFF00)) * B32 | \
1142 (static_cast<uint64_t>(v1.code())) * B36 | \
1143 (static_cast<uint64_t>(r1.code())) * B32 | \
1144 (static_cast<uint64_t>(r2.code())) * B28 | \
1145 (static_cast<uint64_t>(0)) * B8 | \
1146 (static_cast<uint64_t>(opcode_value & 0x00FF)); \
1150#undef DECLARE_VRR_E_INSTRUCTIONS
1152#define DECLARE_VRX_INSTRUCTIONS(name, opcode_name, opcode_value) \
1153 void name(DoubleRegister v1, const MemOperand& opnd, Condition m3) { \
1155 (static_cast<uint64_t>(opcode_value & 0xFF00)) * B32 | \
1156 (static_cast<uint64_t>(v1.code())) * B36 | \
1157 (static_cast<uint64_t>(opnd.getIndexRegister().code())) * B32 | \
1158 (static_cast<uint64_t>(opnd.getBaseRegister().code())) * B28 | \
1159 (static_cast<uint64_t>(opnd.getDisplacement())) * B16 | \
1160 (static_cast<uint64_t>(m3 & 0xF)) * B12 | \
1161 (static_cast<uint64_t>(0)) * B8 | \
1162 (static_cast<uint64_t>(opcode_value & 0x00FF)); \
1166#undef DECLARE_VRX_INSTRUCTIONS
1168#define DECLARE_VRS_A_INSTRUCTIONS(name, opcode_name, opcode_value) \
1169 void name(DoubleRegister v1, DoubleRegister v2, const MemOperand& opnd, \
1170 Condition m4 = Condition(0)) { \
1172 (static_cast<uint64_t>(opcode_value & 0xFF00)) * B32 | \
1173 (static_cast<uint64_t>(v1.code())) * B36 | \
1174 (static_cast<uint64_t>(v2.code())) * B32 | \
1175 (static_cast<uint64_t>(opnd.getBaseRegister().code())) * B28 | \
1176 (static_cast<uint64_t>(opnd.getDisplacement())) * B16 | \
1177 (static_cast<uint64_t>(m4 & 0xF)) * B12 | \
1178 (static_cast<uint64_t>(0)) * B8 | \
1179 (static_cast<uint64_t>(opcode_value & 0x00FF)); \
1183#undef DECLARE_VRS_A_INSTRUCTIONS
1185#define DECLARE_VRS_B_INSTRUCTIONS(name, opcode_name, opcode_value) \
1186 void name(DoubleRegister v1, Register r1, const MemOperand& opnd, \
1187 Condition m4 = Condition(0)) { \
1189 (static_cast<uint64_t>(opcode_value & 0xFF00)) * B32 | \
1190 (static_cast<uint64_t>(v1.code())) * B36 | \
1191 (static_cast<uint64_t>(r1.code())) * B32 | \
1192 (static_cast<uint64_t>(opnd.getBaseRegister().code())) * B28 | \
1193 (static_cast<uint64_t>(opnd.getDisplacement())) * B16 | \
1194 (static_cast<uint64_t>(m4 & 0xF)) * B12 | \
1195 (static_cast<uint64_t>(0)) * B8 | \
1196 (static_cast<uint64_t>(opcode_value & 0x00FF)); \
1200#undef DECLARE_VRS_B_INSTRUCTIONS
1202#define DECLARE_VRS_C_INSTRUCTIONS(name, opcode_name, opcode_value) \
1203 void name(Register r1, DoubleRegister v1, const MemOperand& opnd, \
1204 Condition m4 = Condition(0)) { \
1206 (static_cast<uint64_t>(opcode_value & 0xFF00)) * B32 | \
1207 (static_cast<uint64_t>(r1.code())) * B36 | \
1208 (static_cast<uint64_t>(v1.code())) * B32 | \
1209 (static_cast<uint64_t>(opnd.getBaseRegister().code())) * B28 | \
1210 (static_cast<uint64_t>(opnd.getDisplacement())) * B16 | \
1211 (static_cast<uint64_t>(m4 & 0xF)) * B12 | \
1212 (static_cast<uint64_t>(0)) * B8 | \
1213 (static_cast<uint64_t>(opcode_value & 0x00FF)); \
1217#undef DECLARE_VRS_C_INSTRUCTIONS
1219#define DECLARE_VRI_A_INSTRUCTIONS(name, opcode_name, opcode_value) \
1220 void name(DoubleRegister v1, const Operand& i2, Condition m3) { \
1221 uint64_t code = (static_cast<uint64_t>(opcode_value & 0xFF00)) * B32 | \
1222 (static_cast<uint64_t>(v1.code())) * B36 | \
1223 (static_cast<uint32_t>(i2.immediate())) * B16 | \
1224 (static_cast<uint64_t>(m3 & 0xF)) * B12 | \
1225 (static_cast<uint64_t>(0)) * B8 | \
1226 (static_cast<uint64_t>(opcode_value & 0x00FF)); \
1230#undef DECLARE_VRI_A_INSTRUCTIONS
1232#define DECLARE_VRI_C_INSTRUCTIONS(name, opcode_name, opcode_value) \
1233 void name(DoubleRegister v1, DoubleRegister v2, const Operand& i2, \
1235 uint64_t code = (static_cast<uint64_t>(opcode_value & 0xFF00)) * B32 | \
1236 (static_cast<uint64_t>(v1.code())) * B36 | \
1237 (static_cast<uint64_t>(v2.code())) * B32 | \
1238 (static_cast<uint16_t>(i2.immediate())) * B16 | \
1239 (static_cast<uint64_t>(m4 & 0xF)) * B12 | \
1240 (static_cast<uint64_t>(0)) * B8 | \
1241 (static_cast<uint64_t>(opcode_value & 0x00FF)); \
1245#undef DECLARE_VRI_C_INSTRUCTIONS
1278 NON_MARKING_NOP = 0,
1284 BRASL_CALL_TYPE_NOP,
1287 PROPERTY_ACCESS_INLINED,
1288 PROPERTY_ACCESS_INLINED_CONTEXT,
1289 PROPERTY_ACCESS_INLINED_CONTEXT_DONT_DELETE,
1292 FIRST_IC_MARKER = PROPERTY_ACCESS_INLINED
1297 void dumy(
int r1,
int x2,
int b2,
int d2);
1319 return Instruction::InstructionBits(buffer_start_ +
pos);
1321 template <
typename T>
1323 Instruction::SetInstructionBits<T>(buffer_start_ +
pos,
instr);
1328 return Instruction::InstructionLength(buffer_start_ +
pos);
1332 return Instruction::InstructionBits(
pc);
1362 static constexpr int kGap = 32;
1363 static_assert(AssemblerBase::kMinimalBufferSize >= 2 * kGap);
1380 static const int kMaximalBufferSize = 512 *
MB;
1384 static constexpr int kMaxRelocSize = RelocInfoWriter::kMaxSize;
1386 std::vector<DeferredRelocInfo> relocations_;
1389 RegList scratch_register_list_;
1393 int last_bound_pos_;
1397 if (buffer_space() <= kGap) {
1408#if V8_TARGET_LITTLE_ENDIAN
1412 x = ((
x & 0x00FF) << 8) | ((
x & 0xFF00) >> 8);
1414 *
reinterpret_cast<uint16_t*
>(
pc_) =
x;
1421#if V8_TARGET_LITTLE_ENDIAN
1425 x = ((
x & 0x000000FF) << 24) | ((
x & 0x0000FF00) << 8) |
1426 ((
x & 0x00FF0000) >> 8) | ((
x & 0xFF000000) >> 24);
1428 *
reinterpret_cast<uint32_t*
>(
pc_) =
x;
1435#if V8_TARGET_LITTLE_ENDIAN
1439 x = (
static_cast<uint64_t
>(
x & 0xFF) << 40) |
1440 (
static_cast<uint64_t
>((
x >> 8) & 0xFF) << 32) |
1441 (
static_cast<uint64_t
>((
x >> 16) & 0xFF) << 24) |
1442 (
static_cast<uint64_t
>((
x >> 24) & 0xFF) << 16) |
1443 (
static_cast<uint64_t
>((
x >> 32) & 0xFF) << 8) |
1444 (
static_cast<uint64_t
>((
x >> 40) & 0xFF));
1445 x |= (*
reinterpret_cast<uint64_t*
>(
pc_) >> 48) << 48;
1450 x |= *
reinterpret_cast<uint64_t*
>(
pc_) & 0xFFFF;
1454 *
reinterpret_cast<uint64_t*
>(
pc_) =
x;
1483 old_available_(*assembler->GetScratchRegisterList()),
1484 old_available_double_(*assembler->GetScratchDoubleRegisterList()) {}
1487 *
assembler_->GetScratchRegisterList() = old_available_;
1488 *
assembler_->GetScratchDoubleRegisterList() = old_available_double_;
1492 return assembler_->GetScratchRegisterList()->PopFirst();
1496 return assembler_->GetScratchDoubleRegisterList()->PopFirst();
1501 return !
assembler_->GetScratchRegisterList()->is_empty();
1507 DCHECK(!available->has(reg1));
1508 DCHECK(!available->has(reg2));
1509 available->set(reg1);
1510 available->set(reg2);
1515 *available = *available | list;
1520 DCHECK_EQ((*available & list).bits(), 0x0);
1521 *available = *available | list;
1525 return *
assembler_->GetScratchDoubleRegisterList();
1528 *
assembler_->GetScratchDoubleRegisterList() = available;
1532 *
assembler_->GetScratchRegisterList() = available;
#define DECLARE_S390_RIS_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_VRI_C_INSTRUCTIONS(name, opcode_name, opcode_value)
#define DECLARE_S390_RRS_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RRD_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RSI_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RX_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RIE_E_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RXY_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RRF_E_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_VRI_A_INSTRUCTIONS(name, opcode_name, opcode_value)
#define DECLARE_S390_RRF_B_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_VRR_B_INSTRUCTIONS(name, opcode_name, opcode_value)
#define DECLARE_VRS_C_INSTRUCTIONS(name, opcode_name, opcode_value)
#define DECLARE_VRS_B_INSTRUCTIONS(name, opcode_name, opcode_value)
#define DECLARE_S390_RIL_AB_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_VRR_C_INSTRUCTIONS(name, opcode_name, opcode_value)
#define DECLARE_VRR_F_INSTRUCTIONS(name, opcode_name, opcode_value)
#define DECLARE_S390_SI_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_VRS_A_INSTRUCTIONS(name, opcode_name, opcode_value)
#define DECLARE_S390_RRE_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RIE_F_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_SS_A_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RIL_C_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RXE_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RSY_B_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RI_C_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RS_A_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RRF_C_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RRF_A_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_SIL_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RS_B_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_S_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RRF_D_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_VRR_E_INSTRUCTIONS(name, opcode_name, opcode_value)
#define DECLARE_S390_RS_SHIFT_FORMAT(name, opcode)
#define DECLARE_S390_RSL_B_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RSL_A_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_SIY_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RI_A_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RR_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RIE_D_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RI_B_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_S390_RSY_A_INSTRUCTIONS(name, op_name, op_value)
#define DECLARE_VRX_INSTRUCTIONS(name, opcode_name, opcode_value)
#define DECLARE_VRR_A_INSTRUCTIONS(name, opcode_name, opcode_value)
void bind_to(Label *L, int pos)
void cgdbr(Condition m3, R1 r1, R2 r2)
SixByteInstr instr_at(int pos)
void GetCode(LocalIsolate *isolate, CodeDesc *desc)
void rs_format(Opcode op, int f1, int f2, int f3, const int f4)
void lgrl(Register r, Label *l)
void emit2bytes(uint16_t x)
void b(Condition cond, Register r)
void ble(Label *l, Label::Distance dist=Label::kFar)
static bool IsCmpRegister(Instr instr)
void lzer(DoubleRegister r1)
uint8_t * buffer_pos() const
Assembler(const MaybeAssemblerZone &, const AssemblerOptions &options, std::unique_ptr< AssemblerBuffer > buffer={})
int branch_offset(Label *L)
void rie_f_format(Opcode opcode, int f1, int f2, int f3, int f4, int f5)
static int deserialization_special_target_size(Address instruction_payload)
static SixByteInstr instr_at(uint8_t *pc)
void rr_format(Opcode opcode, int f1, int f2)
void stop(Condition cond=al, int32_t code=kDefaultStopCode, CRegister cr=cr7)
void AllocateAndInstallRequestedHeapNumbers(LocalIsolate *isolate)
void emit_label_addr(Label *label)
void pfd(Condition cond, Register x2, Register b2, const Operand &d2)
static bool IsCmpImmediate(Instr instr)
static void deserialization_set_target_internal_reference_at(Address pc, Address target, WritableJitAllocation &jit_allocation, RelocInfo::Mode mode=RelocInfo::INTERNAL_REFERENCE)
void branchOnCond(Condition c, int branch_offset, bool is_bound=false, bool force_long_branch=false)
static bool IsNop(SixByteInstr instr, int type=NON_MARKING_NOP)
DoubleRegList * GetScratchDoubleRegisterList()
void call(Handle< Code > target, RelocInfo::Mode rmode)
void bc_long(Condition cond, Label *l)
void vfs(DoubleRegister v1, DoubleRegister v2, DoubleRegister v3)
void jump(Handle< Code > target, RelocInfo::Mode rmode, Condition cond)
void rsl_format(Opcode op, uint16_t f1, int f2, int f3, int f4, int f5)
void s_format(Opcode op, int f1, int f2)
void b(Label *l, Label::Distance dist=Label::kFar)
void emit6bytes(uint64_t x)
void rxy_format(Opcode opcode, int f1, int f2, int f3, int f4)
void bunordered(Label *l, Label::Distance dist=Label::kFar)
void load_label_offset(Register r1, Label *L)
void rrd_format(Opcode opcode, int f1, int f2, int f3)
static void set_uint32_constant_at(Address pc, Address constant_pool, uint32_t new_constant, WritableJitAllocation *jit_allocation, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
void brxh(Register dst, Register inc, Label *L)
void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data=0)
void b(Register r, Label *l)
void rsy_format(Opcode op, int f1, int f2, int f3, int f4)
void sil_format(Opcode op, int f1, int f2, int f3)
void cfdbr(Condition m3, R1 r1, R2 r2)
static uint32_t uint32_constant_at(Address pc, Address constant_pool)
void dumy(int r1, int x2, int b2, int d2)
static V8_INLINE void set_target_address_at(Address pc, Address constant_pool, Address target, WritableJitAllocation *jit_allocation, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
RegList * GetScratchRegisterList()
void vfm(DoubleRegister v1, DoubleRegister v2, DoubleRegister v3)
static Tagged_t target_compressed_address_at(Address pc, Address constant_pool)
void cfebr(Condition m3, R1 r1, R2 r2)
void rrf_format(Opcode op, int f1, int f2, int f3, int f4)
void beq(Label *l, Label::Distance dist=Label::kFar)
void larl(Register r, Label *l)
void rx_format(Opcode opcode, int f1, int f2, int f3, int f4)
static bool IsBranch(Instr instr)
void jmp(Label *l, Label::Distance dist=Label::kFar)
void EnsureSpaceFor(int space_needed)
void b(Condition cond, Label *l, Label::Distance dist=Label::kFar, bool force_long_branch=false)
void GetCode(Isolate *isolate, CodeDesc *desc)
void breakpoint(bool do_print)
void ri_format(Opcode opcode, int f1, int f2)
void vfa(DoubleRegister v1, DoubleRegister v2, DoubleRegister v3)
void bordered(Register r)
void bc(Condition cond, Register x2, Register b2, const Operand &d2)
Handle< HeapObject > compressed_embedded_object_handle_at(Address pc, Address constant_pool)
void MaybeEmitOutOfLineConstantPool()
void target_at_put(int pos, int target_pos, bool *is_branch=nullptr)
Handle< Object > code_target_object_handle_at(Address pc)
void si_format(Opcode op, int f1, int f2, int f3)
void instr_at_put(int pos, T instr)
static V8_INLINE Address target_address_at(Address pc, Address constant_pool)
void brxhg(Register dst, Register inc, Label *L)
void bgt(Label *l, Label::Distance dist=Label::kFar)
void rie_d_format(Opcode opcode, int f1, int f2, int f3, int f4)
void GetCode(LocalIsolate *isolate, CodeDesc *desc, SafepointTableBuilderBase *safepoint_table_builder, int handler_table_offset)
void emit4bytes(uint32_t x)
void bge(Label *l, Label::Distance dist=Label::kFar)
void bordered(Label *l, Label::Distance dist=Label::kFar)
void ris_format(Opcode op, int f1, int f2, int f3, int f4, int f5)
void bne(Label *l, Label::Distance dist=Label::kFar)
void rxe_format(Opcode op, int f1, int f2, int f3, int f4, int f5=0)
int32_t instr_length_at(int pos)
static Condition GetCondition(Instr instr)
void cgebr(Condition m3, R1 r1, R2 r2)
void ril_format(Opcode opcode, int f1, int f2)
void rsi_format(Opcode op, int f1, int f2, int f3)
void bc_short(Condition cond, Label *l, Label::Distance dist=Label::kFar)
void bkpt(uint32_t imm16)
void blt(Label *l, Label::Distance dist=Label::kFar)
void rre_format(Opcode opcode, int f1, int f2)
Assembler(const AssemblerOptions &, std::unique_ptr< AssemblerBuffer >={})
static bool Is64BitLoadIntoIP(SixByteInstr instr1, SixByteInstr instr2)
void ss_a_format(Opcode op, int f1, int f2, int f3, int f4, int f5)
int SizeOfCodeGeneratedSince(Label *label)
void rrs_format(Opcode op, int f1, int f2, int f3, int f4, int f5)
void RecordDeoptReason(DeoptimizeReason reason, uint32_t node_id, SourcePosition position, int id)
void siy_format(Opcode op, int f1, int f2, int f3)
void rie_e_format(Opcode opcode, int f1, int f2, int f3)
void bunordered(Register r)
void vfd(DoubleRegister v1, DoubleRegister v2, DoubleRegister v3)
static void set_target_compressed_address_at(Address pc, Address constant_pool, Tagged_t target, WritableJitAllocation *jit_allocation, ICacheFlushMode icache_flush_mode=FLUSH_ICACHE_IF_NEEDED)
int max_reach_from(int pos)
void GrowBuffer(int needed=0)
RelocInfo::Mode rmode() const
DeferredRelocInfo(int position, RelocInfo::Mode rmode, intptr_t data)
EnsureSpace(Assembler *assembler)
V8_EXPORT_PRIVATE Address address() const
MemOperand(Register rx, Register rb, Disp offset=0)
Register getBaseRegister() const
Register getIndexRegister() const
MemOperand(Register rx, Disp offset=0)
uint32_t getDisplacement() const
intptr_t immediate() const
V8_INLINE Operand(Tagged< Smi > value)
bool is_heap_number_request() const
RelocInfo::Mode rmode() const
V8_INLINE Operand(const ExternalReference &f)
static Operand EmbeddedNumber(double value)
bool must_output_reloc_info(const Assembler *assembler) const
Operand(Handle< HeapObject > handle)
HeapNumberRequest heap_number_request() const
V8_INLINE bool is_reg() const
V8_INLINE Operand(intptr_t immediate, RelocInfo::Mode rmode=RelocInfo::NO_INFO)
static V8_INLINE Operand Zero()
int32_t immediate() const
V8_INLINE Operand(Register rm)
constexpr int8_t code() const
UseScratchRegisterScope(Assembler *assembler)
void Include(DoubleRegList list)
~UseScratchRegisterScope()
void SetAvailableDoubleRegList(DoubleRegList available)
void Include(RegList list)
DoubleRegister AcquireDouble()
void SetAvailable(RegList available)
void Include(const Register ®1, const Register ®2=no_reg)
DoubleRegList AvailableDoubleRegList()
#define S390_RIE_E_OPCODE_LIST(V)
#define S390_RRD_OPCODE_LIST(V)
#define S390_VRR_E_OPCODE_LIST(V)
#define S390_SIY_OPCODE_LIST(V)
#define S390_RRF_A_OPCODE_LIST(V)
#define S390_VRI_A_OPCODE_LIST(V)
#define S390_RSL_B_OPCODE_LIST(V)
#define S390_VRI_C_OPCODE_LIST(V)
#define S390_S_OPCODE_LIST(V)
#define S390_RRF_C_OPCODE_LIST(V)
#define S390_RRE_OPCODE_LIST(V)
#define S390_VRR_C_OPCODE_LIST(V)
#define S390_SS_A_OPCODE_LIST(V)
#define S390_RSY_B_OPCODE_LIST(V)
#define S390_RXE_OPCODE_LIST(V)
#define S390_VRS_A_OPCODE_LIST(V)
#define S390_RIE_F_OPCODE_LIST(V)
#define S390_VRR_A_OPCODE_LIST(V)
#define S390_RXY_A_OPCODE_LIST(V)
#define S390_VRS_B_OPCODE_LIST(V)
#define S390_RI_B_OPCODE_LIST(V)
#define S390_RS_A_OPCODE_LIST(V)
#define S390_RSY_A_OPCODE_LIST(V)
#define S390_RI_A_OPCODE_LIST(V)
#define S390_VRR_F_OPCODE_LIST(V)
#define S390_VRR_B_OPCODE_LIST(V)
#define S390_SIL_OPCODE_LIST(V)
#define S390_RIL_A_OPCODE_LIST(V)
#define S390_RIL_B_OPCODE_LIST(V)
#define S390_VRS_C_OPCODE_LIST(V)
#define S390_RRF_D_OPCODE_LIST(V)
#define S390_RSL_A_OPCODE_LIST(V)
#define S390_RRF_E_OPCODE_LIST(V)
#define S390_RIL_C_OPCODE_LIST(V)
#define S390_RIE_D_OPCODE_LIST(V)
#define S390_VRX_OPCODE_LIST(V)
#define S390_RRF_B_OPCODE_LIST(V)
#define S390_RI_C_OPCODE_LIST(V)
#define S390_RX_A_OPCODE_LIST(V)
#define S390_SI_OPCODE_LIST(V)
#define S390_RIS_OPCODE_LIST(V)
#define S390_RS_B_OPCODE_LIST(V)
#define S390_RSI_OPCODE_LIST(V)
#define S390_RRS_OPCODE_LIST(V)
#define S390_RR_OPCODE_LIST(V)
BytecodeAssembler & assembler_
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in allocation gc speed threshold for starting incremental marking via a task in percent of available threshold for starting incremental marking immediately in percent of available Use a single schedule for determining a marking schedule between JS and C objects schedules the minor GC task with kUserVisible priority max worker number of concurrent for NumberOfWorkerThreads start background threads that allocate memory concurrent_array_buffer_sweeping use parallel threads to clear weak refs in the atomic pause trace progress of the incremental marking trace object counts and memory usage * MB
constexpr Register no_reg
void PrintF(const char *format,...)
std::variant< Zone *, AccountingAllocator * > MaybeAssemblerZone
#define DCHECK_NOT_NULL(val)
#define DCHECK_IMPLIES(v1, v2)
#define DCHECK_NE(v1, v2)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
#define DCHECK_GT(v1, v2)
#define V8_EXPORT_PRIVATE
std::unique_ptr< ValueMirror > value