v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
liftoff-assembler-s390-inl.h File Reference
Include dependency graph for liftoff-assembler-s390-inl.h:

Go to the source code of this file.

Namespaces

namespace  v8
 
namespace  v8::internal
 
namespace  v8::internal::wasm
 
namespace  v8::internal::wasm::liftoff
 

Macros

#define PREP_MEM_OPERAND(offset_reg, offset_imm, scratch)
 
#define SIGN_EXT(r)
 
#define INT32_AND_WITH_1F(x)
 
#define INT32_AND_WITH_3F(x)
 
#define REGISTER_AND_WITH_1F
 
#define LFR_TO_REG(reg)
 
#define UNOP_LIST(V)
 
#define EMIT_UNOP_FUNCTION(name, instr, dtype, stype, dcast, scast, rcast, ret, return_type)
 
#define BINOP_LIST(V)
 
#define EMIT_BINOP_FUNCTION(name, instr, dtype, stype1, stype2, dcast, scast1, scast2, rcast, ret, return_type)
 
#define EMIT_EQZ(test, src)
 
#define EMIT_SET_CONDITION(dst, cond)
 
#define SIMD_BINOP_RR_LIST(V)
 
#define EMIT_SIMD_BINOP_RR(name, op)
 
#define SIMD_SHIFT_RR_LIST(V)
 
#define EMIT_SIMD_SHIFT_RR(name, op)
 
#define SIMD_SHIFT_RI_LIST(V)
 
#define EMIT_SIMD_SHIFT_RI(name, op, mask)
 
#define SIMD_UNOP_LIST(V)
 
#define EMIT_SIMD_UNOP(name, op, dtype, stype, return_val, return_type)
 
#define SIMD_EXTRACT_LANE_LIST(V)
 
#define EMIT_SIMD_EXTRACT_LANE(name, op, dtype)
 
#define SIMD_REPLACE_LANE_LIST(V)
 
#define EMIT_SIMD_REPLACE_LANE(name, op, stype)
 
#define SIMD_EXT_MUL_LIST(V)
 
#define EMIT_SIMD_EXT_MUL(name, op)
 
#define SIMD_ALL_TRUE_LIST(V)
 
#define EMIT_SIMD_ALL_TRUE(name, op)
 
#define SIMD_ADD_SUB_SAT_LIST(V)
 
#define EMIT_SIMD_ADD_SUB_SAT(name, op)
 
#define SIMD_EXT_ADD_PAIRWISE_LIST(V)
 
#define EMIT_SIMD_EXT_ADD_PAIRWISE(name, op)
 
#define SIMD_QFM_LIST(V)
 
#define EMIT_SIMD_QFM(name, op)
 
#define SIMD_RELAXED_BINOP_LIST(V)
 
#define SIMD_VISIT_RELAXED_BINOP(name, op)
 
#define SIMD_RELAXED_UNOP_LIST(V)
 
#define SIMD_VISIT_RELAXED_UNOP(name, op)
 
#define F16_UNOP_LIST(V)
 
#define VISIT_F16_UNOP(name)
 
#define F16_BINOP_LIST(V)
 
#define VISIT_F16_BINOP(name)
 

Functions

MemOperand v8::internal::wasm::liftoff::GetStackSlot (uint32_t offset)
 
MemOperand v8::internal::wasm::liftoff::GetInstanceDataOperand ()
 
void v8::internal::wasm::liftoff::StoreToMemory (LiftoffAssembler *assm, MemOperand dst, const LiftoffAssembler::VarState &src, Register scratch)
 

Macro Definition Documentation

◆ BINOP_LIST

#define BINOP_LIST ( V)

Definition at line 1693 of file liftoff-assembler-s390-inl.h.

◆ EMIT_BINOP_FUNCTION

#define EMIT_BINOP_FUNCTION ( name,
instr,
dtype,
stype1,
stype2,
dcast,
scast1,
scast2,
rcast,
ret,
return_type )
Value:
return_type LiftoffAssembler::emit_##name(dtype dst, stype1 lhs, \
stype2 rhs) { \
auto _dst = dcast(dst); \
auto _lhs = scast1(lhs); \
auto _rhs = scast2(rhs); \
instr(_dst, _lhs, _rhs); \
rcast(_dst); \
return ret; \
}
const char * name
Definition builtins.cc:39

Definition at line 1776 of file liftoff-assembler-s390-inl.h.

◆ EMIT_EQZ

#define EMIT_EQZ ( test,
src )
Value:
{ \
Label done; \
test(r0, src); \
mov(dst, Operand(1)); \
beq(&done); \
mov(dst, Operand(0)); \
bind(&done); \
}

Definition at line 2297 of file liftoff-assembler-s390-inl.h.

◆ EMIT_SET_CONDITION

#define EMIT_SET_CONDITION ( dst,
cond )
Value:
{ \
Label done; \
lghi(dst, Operand(1)); \
b(cond, &done); \
lghi(dst, Operand(0)); \
bind(&done); \
}

Definition at line 2311 of file liftoff-assembler-s390-inl.h.

◆ EMIT_SIMD_ADD_SUB_SAT

#define EMIT_SIMD_ADD_SUB_SAT ( name,
op )
Value:
void LiftoffAssembler::emit_##name(LiftoffRegister dst, LiftoffRegister lhs, \
LiftoffRegister rhs) { \
Simd128Register src1 = lhs.fp(); \
Simd128Register src2 = rhs.fp(); \
Simd128Register dest = dst.fp(); \
/* lhs and rhs are unique based on their selection under liftoff-compiler \
* `EmitBinOp`. */ \
/* Make sure dst and temp are also unique. */ \
if (dest == src1 || dest == src2) { \
dest = GetUnusedRegister(kFpReg, LiftoffRegList{src1, src2}).fp(); \
} \
Simd128Register temp = \
GetUnusedRegister(kFpReg, LiftoffRegList{dest, src1, src2}).fp(); \
op(dest, src1, src2, kScratchDoubleReg, temp); \
/* Original dst register needs to be populated. */ \
if (dest != dst.fp()) { \
vlr(dst.fp(), dest, Condition(0), Condition(0), Condition(0)); \
} \
}
QwNeonRegister Simd128Register

Definition at line 2659 of file liftoff-assembler-s390-inl.h.

◆ EMIT_SIMD_ALL_TRUE

#define EMIT_SIMD_ALL_TRUE ( name,
op )
Value:
void LiftoffAssembler::emit_##name(LiftoffRegister dst, \
LiftoffRegister src) { \
op(dst.gp(), src.fp(), r0, kScratchDoubleReg); \
}

Definition at line 2640 of file liftoff-assembler-s390-inl.h.

◆ EMIT_SIMD_BINOP_RR

#define EMIT_SIMD_BINOP_RR ( name,
op )
Value:
void LiftoffAssembler::emit_##name(LiftoffRegister dst, LiftoffRegister lhs, \
LiftoffRegister rhs) { \
op(dst.fp(), lhs.fp(), rhs.fp()); \
}

Definition at line 2463 of file liftoff-assembler-s390-inl.h.

◆ EMIT_SIMD_EXT_ADD_PAIRWISE

#define EMIT_SIMD_EXT_ADD_PAIRWISE ( name,
op )
Value:
void LiftoffAssembler::emit_##name(LiftoffRegister dst, \
LiftoffRegister src) { \
Simd128Register src1 = src.fp(); \
Simd128Register dest = dst.fp(); \
/* Make sure dst and temp are unique. */ \
if (dest == src1) { \
dest = GetUnusedRegister(kFpReg, LiftoffRegList{src1}).fp(); \
} \
Simd128Register temp = \
GetUnusedRegister(kFpReg, LiftoffRegList{dest, src1}).fp(); \
op(dest, src1, kScratchDoubleReg, temp); \
if (dest != dst.fp()) { \
vlr(dst.fp(), dest, Condition(0), Condition(0), Condition(0)); \
} \
}

Definition at line 2688 of file liftoff-assembler-s390-inl.h.

◆ EMIT_SIMD_EXT_MUL

#define EMIT_SIMD_EXT_MUL ( name,
op )
Value:
void LiftoffAssembler::emit_##name( \
LiftoffRegister dst, LiftoffRegister src1, LiftoffRegister src2) { \
op(dst.fp(), src1.fp(), src2.fp(), kScratchDoubleReg); \
}

Definition at line 2625 of file liftoff-assembler-s390-inl.h.

◆ EMIT_SIMD_EXTRACT_LANE

#define EMIT_SIMD_EXTRACT_LANE ( name,
op,
dtype )
Value:
void LiftoffAssembler::emit_##name(LiftoffRegister dst, LiftoffRegister src, \
uint8_t imm_lane_idx) { \
op(dst.dtype(), src.fp(), imm_lane_idx, r0); \
}

Definition at line 2584 of file liftoff-assembler-s390-inl.h.

◆ EMIT_SIMD_QFM

#define EMIT_SIMD_QFM ( name,
op )
Value:
void LiftoffAssembler::emit_##name( \
LiftoffRegister dst, LiftoffRegister src1, LiftoffRegister src2, \
LiftoffRegister src3) { \
op(dst.fp(), src1.fp(), src2.fp(), src3.fp()); \
}

Definition at line 2714 of file liftoff-assembler-s390-inl.h.

◆ EMIT_SIMD_REPLACE_LANE

#define EMIT_SIMD_REPLACE_LANE ( name,
op,
stype )
Value:
void LiftoffAssembler::emit_##name( \
LiftoffRegister dst, LiftoffRegister src1, LiftoffRegister src2, \
uint8_t imm_lane_idx) { \
op(dst.fp(), src1.fp(), src2.stype(), imm_lane_idx, r0); \
}

Definition at line 2601 of file liftoff-assembler-s390-inl.h.

◆ EMIT_SIMD_SHIFT_RI

#define EMIT_SIMD_SHIFT_RI ( name,
op,
mask )
Value:
void LiftoffAssembler::emit_##name(LiftoffRegister dst, LiftoffRegister lhs, \
int32_t rhs) { \
op(dst.fp(), lhs.fp(), Operand(rhs & mask), r0, kScratchDoubleReg); \
}
uint32_t const mask

Definition at line 2509 of file liftoff-assembler-s390-inl.h.

◆ EMIT_SIMD_SHIFT_RR

#define EMIT_SIMD_SHIFT_RR ( name,
op )
Value:
void LiftoffAssembler::emit_##name(LiftoffRegister dst, LiftoffRegister lhs, \
LiftoffRegister rhs) { \
op(dst.fp(), lhs.fp(), rhs.gp(), kScratchDoubleReg); \
}

Definition at line 2486 of file liftoff-assembler-s390-inl.h.

◆ EMIT_SIMD_UNOP

#define EMIT_SIMD_UNOP ( name,
op,
dtype,
stype,
return_val,
return_type )
Value:
return_type LiftoffAssembler::emit_##name(LiftoffRegister dst, \
LiftoffRegister src) { \
op(dst.dtype(), src.stype()); \
return return_val; \
}

Definition at line 2564 of file liftoff-assembler-s390-inl.h.

◆ EMIT_UNOP_FUNCTION

#define EMIT_UNOP_FUNCTION ( name,
instr,
dtype,
stype,
dcast,
scast,
rcast,
ret,
return_type )
Value:
return_type LiftoffAssembler::emit_##name(dtype dst, stype src) { \
auto _dst = dcast(dst); \
auto _src = scast(src); \
instr(_dst, _src); \
rcast(_dst); \
return ret; \
}

Definition at line 1678 of file liftoff-assembler-s390-inl.h.

◆ F16_BINOP_LIST

#define F16_BINOP_LIST ( V)
Value:
V(f16x8_eq) \
V(f16x8_ne) \
V(f16x8_lt) \
V(f16x8_le) \
V(f16x8_add) \
V(f16x8_sub) \
V(f16x8_mul) \
V(f16x8_div) \
V(f16x8_min) \
V(f16x8_max) \
V(f16x8_pmin) \
V(f16x8_pmax)
#define V(Name)

Definition at line 2782 of file liftoff-assembler-s390-inl.h.

◆ F16_UNOP_LIST

#define F16_UNOP_LIST ( V)
Value:
V(f16x8_splat) \
V(f16x8_abs) \
V(f16x8_neg) \
V(f16x8_sqrt) \
V(f16x8_ceil) \
V(f16x8_floor) \
V(f16x8_trunc) \
V(f16x8_nearest_int) \
V(i16x8_sconvert_f16x8) \
V(i16x8_uconvert_f16x8) \
V(f16x8_sconvert_i16x8) \
V(f16x8_uconvert_i16x8) \
V(f16x8_demote_f32x4_zero) \
V(f32x4_promote_low_f16x8) \
V(f16x8_demote_f64x2_zero)

Definition at line 2756 of file liftoff-assembler-s390-inl.h.

◆ INT32_AND_WITH_1F

#define INT32_AND_WITH_1F ( x)
Value:
Operand(x & 0x1f)
int x

Definition at line 1631 of file liftoff-assembler-s390-inl.h.

◆ INT32_AND_WITH_3F

#define INT32_AND_WITH_3F ( x)
Value:
Operand(x & 0x3f)

Definition at line 1632 of file liftoff-assembler-s390-inl.h.

◆ LFR_TO_REG

#define LFR_TO_REG ( reg)
Value:
reg.gp()
LiftoffRegister reg

Definition at line 1639 of file liftoff-assembler-s390-inl.h.

◆ PREP_MEM_OPERAND

#define PREP_MEM_OPERAND ( offset_reg,
offset_imm,
scratch )
Value:
if (offset_reg != no_reg && !i64_offset) { \
/* Clear the upper 32 bits of the 64 bit offset register.*/ \
llgfr(scratch, offset_reg); \
offset_reg = scratch; \
} \
if (!is_int20(offset_imm)) { \
if (offset_reg != no_reg) { \
mov(r0, Operand(offset_imm)); \
AddS64(r0, offset_reg); \
mov(scratch, r0); \
} else { \
mov(scratch, Operand(offset_imm)); \
} \
offset_reg = scratch; \
offset_imm = 0; \
}

Definition at line 557 of file liftoff-assembler-s390-inl.h.

◆ REGISTER_AND_WITH_1F

#define REGISTER_AND_WITH_1F
Value:
([&](Register rhs) { \
AndP(r1, rhs, Operand(31)); \
return r1; \
})

Definition at line 1633 of file liftoff-assembler-s390-inl.h.

◆ SIGN_EXT

#define SIGN_EXT ( r)
Value:
lgfr(r, r)
int r
Definition mul-fft.cc:298

Definition at line 1630 of file liftoff-assembler-s390-inl.h.

◆ SIMD_ADD_SUB_SAT_LIST

#define SIMD_ADD_SUB_SAT_LIST ( V)
Value:
V(i16x8_add_sat_s, I16x8AddSatS) \
V(i16x8_sub_sat_s, I16x8SubSatS) \
V(i16x8_add_sat_u, I16x8AddSatU) \
V(i16x8_sub_sat_u, I16x8SubSatU) \
V(i8x16_add_sat_s, I8x16AddSatS) \
V(i8x16_sub_sat_s, I8x16SubSatS) \
V(i8x16_add_sat_u, I8x16AddSatU) \
V(i8x16_sub_sat_u, I8x16SubSatU)

Definition at line 2649 of file liftoff-assembler-s390-inl.h.

◆ SIMD_ALL_TRUE_LIST

#define SIMD_ALL_TRUE_LIST ( V)
Value:
V(i64x2_alltrue, I64x2AllTrue) \
V(i32x4_alltrue, I32x4AllTrue) \
V(i16x8_alltrue, I16x8AllTrue) \
V(i8x16_alltrue, I8x16AllTrue)

Definition at line 2634 of file liftoff-assembler-s390-inl.h.

◆ SIMD_BINOP_RR_LIST

#define SIMD_BINOP_RR_LIST ( V)

Definition at line 2390 of file liftoff-assembler-s390-inl.h.

◆ SIMD_EXT_ADD_PAIRWISE_LIST

#define SIMD_EXT_ADD_PAIRWISE_LIST ( V)
Value:
V(i32x4_extadd_pairwise_i16x8_s, I32x4ExtAddPairwiseI16x8S) \
V(i32x4_extadd_pairwise_i16x8_u, I32x4ExtAddPairwiseI16x8U) \
V(i16x8_extadd_pairwise_i8x16_s, I16x8ExtAddPairwiseI8x16S) \
V(i16x8_extadd_pairwise_i8x16_u, I16x8ExtAddPairwiseI8x16U)

Definition at line 2682 of file liftoff-assembler-s390-inl.h.

◆ SIMD_EXT_MUL_LIST

#define SIMD_EXT_MUL_LIST ( V)
Value:
V(i64x2_extmul_low_i32x4_s, I64x2ExtMulLowI32x4S) \
V(i64x2_extmul_low_i32x4_u, I64x2ExtMulLowI32x4U) \
V(i64x2_extmul_high_i32x4_s, I64x2ExtMulHighI32x4S) \
V(i64x2_extmul_high_i32x4_u, I64x2ExtMulHighI32x4U) \
V(i32x4_extmul_low_i16x8_s, I32x4ExtMulLowI16x8S) \
V(i32x4_extmul_low_i16x8_u, I32x4ExtMulLowI16x8U) \
V(i32x4_extmul_high_i16x8_s, I32x4ExtMulHighI16x8S) \
V(i32x4_extmul_high_i16x8_u, I32x4ExtMulHighI16x8U) \
V(i16x8_extmul_low_i8x16_s, I16x8ExtMulLowI8x16S) \
V(i16x8_extmul_low_i8x16_u, I16x8ExtMulLowI8x16U) \
V(i16x8_extmul_high_i8x16_s, I16x8ExtMulHighI8x16S) \
V(i16x8_extmul_high_i8x16_u, I16x8ExtMulHighI8x16U)

Definition at line 2611 of file liftoff-assembler-s390-inl.h.

◆ SIMD_EXTRACT_LANE_LIST

#define SIMD_EXTRACT_LANE_LIST ( V)
Value:
V(f64x2_extract_lane, F64x2ExtractLane, fp) \
V(f32x4_extract_lane, F32x4ExtractLane, fp) \
V(i64x2_extract_lane, I64x2ExtractLane, gp) \
V(i32x4_extract_lane, I32x4ExtractLane, gp) \
V(i16x8_extract_lane_u, I16x8ExtractLaneU, gp) \
V(i16x8_extract_lane_s, I16x8ExtractLaneS, gp) \
V(i8x16_extract_lane_u, I8x16ExtractLaneU, gp) \
V(i8x16_extract_lane_s, I8x16ExtractLaneS, gp)

Definition at line 2574 of file liftoff-assembler-s390-inl.h.

◆ SIMD_QFM_LIST

#define SIMD_QFM_LIST ( V)
Value:
V(f64x2_qfma, F64x2Qfma) \
V(f64x2_qfms, F64x2Qfms) \
V(f32x4_qfma, F32x4Qfma) \
V(f32x4_qfms, F32x4Qfms)

Definition at line 2708 of file liftoff-assembler-s390-inl.h.

◆ SIMD_RELAXED_BINOP_LIST

#define SIMD_RELAXED_BINOP_LIST ( V)
Value:
V(i8x16_relaxed_swizzle, i8x16_swizzle) \
V(f64x2_relaxed_min, f64x2_pmin) \
V(f64x2_relaxed_max, f64x2_pmax) \
V(f32x4_relaxed_min, f32x4_pmin) \
V(f32x4_relaxed_max, f32x4_pmax) \
V(i16x8_relaxed_q15mulr_s, i16x8_q15mulr_sat_s)

Definition at line 2724 of file liftoff-assembler-s390-inl.h.

◆ SIMD_RELAXED_UNOP_LIST

#define SIMD_RELAXED_UNOP_LIST ( V)
Value:
V(i32x4_relaxed_trunc_f32x4_s, i32x4_sconvert_f32x4) \
V(i32x4_relaxed_trunc_f32x4_u, i32x4_uconvert_f32x4) \
V(i32x4_relaxed_trunc_f64x2_s_zero, i32x4_trunc_sat_f64x2_s_zero) \
V(i32x4_relaxed_trunc_f64x2_u_zero, i32x4_trunc_sat_f64x2_u_zero)

Definition at line 2741 of file liftoff-assembler-s390-inl.h.

◆ SIMD_REPLACE_LANE_LIST

#define SIMD_REPLACE_LANE_LIST ( V)
Value:
V(f64x2_replace_lane, F64x2ReplaceLane, fp) \
V(f32x4_replace_lane, F32x4ReplaceLane, fp) \
V(i64x2_replace_lane, I64x2ReplaceLane, gp) \
V(i32x4_replace_lane, I32x4ReplaceLane, gp) \
V(i16x8_replace_lane, I16x8ReplaceLane, gp) \
V(i8x16_replace_lane, I8x16ReplaceLane, gp)

Definition at line 2593 of file liftoff-assembler-s390-inl.h.

◆ SIMD_SHIFT_RI_LIST

#define SIMD_SHIFT_RI_LIST ( V)
Value:
V(i64x2_shli, I64x2Shl, 63) \
V(i64x2_shri_s, I64x2ShrS, 63) \
V(i64x2_shri_u, I64x2ShrU, 63) \
V(i32x4_shli, I32x4Shl, 31) \
V(i32x4_shri_s, I32x4ShrS, 31) \
V(i32x4_shri_u, I32x4ShrU, 31) \
V(i16x8_shli, I16x8Shl, 15) \
V(i16x8_shri_s, I16x8ShrS, 15) \
V(i16x8_shri_u, I16x8ShrU, 15) \
V(i8x16_shli, I8x16Shl, 7) \
V(i8x16_shri_s, I8x16ShrS, 7) \
V(i8x16_shri_u, I8x16ShrU, 7)

Definition at line 2495 of file liftoff-assembler-s390-inl.h.

◆ SIMD_SHIFT_RR_LIST

#define SIMD_SHIFT_RR_LIST ( V)
Value:
V(i64x2_shl, I64x2Shl) \
V(i64x2_shr_s, I64x2ShrS) \
V(i64x2_shr_u, I64x2ShrU) \
V(i32x4_shl, I32x4Shl) \
V(i32x4_shr_s, I32x4ShrS) \
V(i32x4_shr_u, I32x4ShrU) \
V(i16x8_shl, I16x8Shl) \
V(i16x8_shr_s, I16x8ShrS) \
V(i16x8_shr_u, I16x8ShrU) \
V(i8x16_shl, I8x16Shl) \
V(i8x16_shr_s, I8x16ShrS) \
V(i8x16_shr_u, I8x16ShrU)

Definition at line 2472 of file liftoff-assembler-s390-inl.h.

◆ SIMD_UNOP_LIST

#define SIMD_UNOP_LIST ( V)

Definition at line 2518 of file liftoff-assembler-s390-inl.h.

◆ SIMD_VISIT_RELAXED_BINOP

#define SIMD_VISIT_RELAXED_BINOP ( name,
op )
Value:
void LiftoffAssembler::emit_##name(LiftoffRegister dst, LiftoffRegister lhs, \
LiftoffRegister rhs) { \
emit_##op(dst, lhs, rhs); \
}

Definition at line 2732 of file liftoff-assembler-s390-inl.h.

◆ SIMD_VISIT_RELAXED_UNOP

#define SIMD_VISIT_RELAXED_UNOP ( name,
op )
Value:
void LiftoffAssembler::emit_##name(LiftoffRegister dst, \
LiftoffRegister src) { \
emit_##op(dst, src); \
}

Definition at line 2747 of file liftoff-assembler-s390-inl.h.

◆ UNOP_LIST

#define UNOP_LIST ( V)

Definition at line 1642 of file liftoff-assembler-s390-inl.h.

◆ VISIT_F16_BINOP

#define VISIT_F16_BINOP ( name)
Value:
bool LiftoffAssembler::emit_##name(LiftoffRegister dst, LiftoffRegister lhs, \
LiftoffRegister rhs) { \
return false; \
}

Definition at line 2796 of file liftoff-assembler-s390-inl.h.

◆ VISIT_F16_UNOP

#define VISIT_F16_UNOP ( name)
Value:
bool LiftoffAssembler::emit_##name(LiftoffRegister dst, \
LiftoffRegister src) { \
return false; \
}

Definition at line 2773 of file liftoff-assembler-s390-inl.h.