30#define ENABLE_STATIC_FACILITY_DETECTION 1
32#define ENABLE_STATIC_FACILITY_DETECTION 0
34#define ENABLE_DYNAMIC_FACILITY_DETECTION 1
38 return "s390x" SLJIT_CPUINFO;
44#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
45#define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3)
47static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 5] = {
48 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 0, 1, 14
97#define IS_GPR_REG(reg) ((reg > 0) && (reg) <= SLJIT_SP)
102#define TMP_FREG1 (SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1)
104static const sljit_u8 freg_map[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 2] = {
105 0, 0, 2, 4, 6, 3, 5, 7, 15, 14, 13, 12, 11, 10, 9, 8, 1
109#define R4A(r) ((r) << 4)
110#define R8A(r) ((r) << 8)
111#define R12A(r) ((r) << 12)
112#define R16A(r) ((r) << 16)
113#define R20A(r) ((r) << 20)
114#define R28A(r) ((r) << 28)
115#define R32A(r) ((r) << 32)
116#define R36A(r) ((r) << 36)
118#define R0(r) ((sljit_ins)reg_map[r])
120#define F0(r) ((sljit_ins)freg_map[r])
121#define F4(r) (R4A((sljit_ins)freg_map[r]))
122#define F12(r) (R12A((sljit_ins)freg_map[r]))
123#define F20(r) (R20A((sljit_ins)freg_map[r]))
124#define F28(r) (R28A((sljit_ins)freg_map[r]))
125#define F32(r) (R32A((sljit_ins)freg_map[r]))
126#define F36(r) (R36A((sljit_ins)freg_map[r]))
149 if (ins & 0xffff00000000L)
152 if (ins & 0xffffffff0000L)
158#define SLJIT_ADD_SUB_NO_COMPARE(status_flags_state) \
159 (((status_flags_state) & (SLJIT_CURRENT_FLAGS_ADD | SLJIT_CURRENT_FLAGS_SUB)) \
160 && !((status_flags_state) & SLJIT_CURRENT_FLAGS_COMPARE))
172 sljit_s32 type = GET_FLAG_TYPE(compiler->status_flags_state);
188 sljit_s32 type = GET_FLAG_TYPE(compiler->status_flags_state);
190 return (cc1 | cc2 | cc3);
198 return (cc1 | cc2 | cc3);
206 return (cc0 | cc2 | cc3);
216 return (cc0 | cc1 | cc2);
244 return (cc0 | cc2 | cc3);
260 return (cc0 | cc1 | cc2);
275 return (cc0 | cc1 | cc3);
291#define STORE_FACILITY_LIST_EXTENDED_FACILITY 7
292#define FAST_LONG_DISPLACEMENT_FACILITY 19
293#define EXTENDED_IMMEDIATE_FACILITY 21
294#define GENERAL_INSTRUCTION_EXTENSION_FACILITY 34
295#define DISTINCT_OPERAND_FACILITY 45
296#define HIGH_WORD_FACILITY 45
297#define POPULATION_COUNT_FACILITY 45
298#define LOAD_STORE_ON_CONDITION_1_FACILITY 45
299#define MISCELLANEOUS_INSTRUCTION_EXTENSIONS_1_FACILITY 49
300#define LOAD_STORE_ON_CONDITION_2_FACILITY 53
301#define MISCELLANEOUS_INSTRUCTION_EXTENSIONS_2_FACILITY 58
302#define VECTOR_FACILITY 129
303#define VECTOR_ENHANCEMENTS_1_FACILITY 135
310#if ENABLE_STATIC_FACILITY_DETECTION
313 return (__ARCH__ >= 6 );
316 return (__ARCH__ >= 7 );
318 return (__ARCH__ >= 8 );
320 return (__ARCH__ >= 9 );
322 return (__ARCH__ >= 10 );
325 return (__ARCH__ >= 11 );
328 return (__ARCH__ >= 12 );
338 static unsigned long hwcap = 0;
340 hwcap = getauxval(AT_HWCAP);
351 return (get_hwcap() & HWCAP_S390_STFLE);
358#if ENABLE_DYNAMIC_FACILITY_DETECTION
362 size_t size =
sizeof(cpu_features);
364 const sljit_uw bit_index = ((1UL << 63) >> (x & 63));
371 __asm__ __volatile__ (
375 :
"d" ((
size / 8) - 1),
"a" (&cpu_features)
376 :
"r0",
"cc",
"memory"
380 return (cpu_features.bits[word_index] & bit_index) != 0;
386#define HAVE_FACILITY(name, bit) \
387static SLJIT_INLINE int name() \
389 static int have = -1; \
391 if (have_facility_static(bit)) \
393 else if (SLJIT_UNLIKELY(have < 0)) \
394 have = have_facility_dynamic(bit) ? 1 : 0; \
407#define is_u12(d) (0 <= (d) && (d) <= 0x00000fffL)
408#define is_u32(d) (0 <= (d) && (d) <= 0xffffffffL)
410#define CHECK_SIGNED(v, bitlen) \
411 ((v) >= -(1 << ((bitlen) - 1)) && (v) < (1 << ((bitlen) - 1)))
413#define is_s8(d) CHECK_SIGNED((d), 8)
414#define is_s16(d) CHECK_SIGNED((d), 16)
415#define is_s20(d) CHECK_SIGNED((d), 20)
416#define is_s32(d) ((d) == (sljit_s32)(d))
424 dh = (d >> 12) & 0xff;
426 return (dh |
dl) << 8;
430#define SLJIT_S390X_INSTRUCTION(op, ...) \
431static SLJIT_INLINE sljit_ins op(__VA_ARGS__)
434#define SLJIT_S390X_RR(name, pattern) \
435SLJIT_S390X_INSTRUCTION(name, sljit_gpr dst, sljit_gpr src) \
437 return (pattern) | ((dst & 0xf) << 4) | (src & 0xf); \
467#define SLJIT_S390X_RRE(name, pattern) \
468SLJIT_S390X_INSTRUCTION(name, sljit_gpr dst, sljit_gpr src) \
470 return (pattern) | R4A(dst) | R0A(src); \
524#undef SLJIT_S390X_RRE
527#define SLJIT_S390X_RIA(name, pattern, imm_type) \
528SLJIT_S390X_INSTRUCTION(name, sljit_gpr reg, imm_type imm) \
530 return (pattern) | R20A(reg) | (imm & 0xffff); \
553#undef SLJIT_S390X_RIA
556#define SLJIT_S390X_RILA(name, pattern, imm_type) \
557SLJIT_S390X_INSTRUCTION(name, sljit_gpr reg, imm_type imm) \
559 SLJIT_ASSERT(have_eimm()); \
560 return (pattern) | R36A(reg) | ((sljit_ins)imm & 0xffffffffu); \
589#undef SLJIT_S390X_RILA
592#define SLJIT_S390X_RXA(name, pattern) \
593SLJIT_S390X_INSTRUCTION(name, sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b) \
595 SLJIT_ASSERT((d & 0xfff) == d); \
597 return (pattern) | R20A(r) | R16A(x) | R12A(b) | (sljit_ins)(d & 0xfff); \
621#undef SLJIT_S390X_RXA
624#define SLJIT_S390X_RXYA(name, pattern, cond) \
625SLJIT_S390X_INSTRUCTION(name, sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b) \
627 SLJIT_ASSERT(cond); \
629 return (pattern) | R36A(r) | R32A(x) | R28A(b) | disp_s20(d); \
670#undef SLJIT_S390X_RXYA
673#define SLJIT_S390X_RSYA(name, pattern, cond) \
674SLJIT_S390X_INSTRUCTION(name, sljit_gpr dst, sljit_gpr src, sljit_s32 d, sljit_gpr b) \
676 SLJIT_ASSERT(cond); \
678 return (pattern) | R36A(dst) | R32A(src) | R28A(b) | disp_s20(d); \
693#undef SLJIT_S390X_RSYA
696#define SLJIT_S390X_RIEF(name, pattern) \
697SLJIT_S390X_INSTRUCTION(name, sljit_gpr dst, sljit_gpr src, sljit_u8 start, sljit_u8 end, sljit_u8 rot) \
699 sljit_ins i3, i4, i5; \
701 SLJIT_ASSERT(have_genext()); \
702 i3 = (sljit_ins)start << 24; \
703 i4 = (sljit_ins)end << 16; \
704 i5 = (sljit_ins)rot << 8; \
706 return (pattern) | R36A(dst & 0xf) | R32A(src & 0xf) | i3 | i4 | i5; \
728#undef SLJIT_S390X_RIEF
731#define SLJIT_S390X_RRFC(name, pattern) \
732SLJIT_S390X_INSTRUCTION(name, sljit_gpr dst, sljit_gpr src, sljit_uw mask) \
736 SLJIT_ASSERT(have_lscond1()); \
737 m3 = (sljit_ins)(mask & 0xf) << 12; \
739 return (pattern) | m3 | R4A(dst) | R0A(src); \
746#undef SLJIT_S390X_RRFC
749#define SLJIT_S390X_RIEG(name, pattern) \
750SLJIT_S390X_INSTRUCTION(name, sljit_gpr reg, sljit_sw imm, sljit_uw mask) \
754 SLJIT_ASSERT(have_lscond2()); \
755 m3 = (sljit_ins)(mask & 0xf) << 32; \
756 i2 = (sljit_ins)(imm & 0xffffL) << 16; \
758 return (pattern) | R36A(reg) | m3 | i2; \
765#undef SLJIT_S390X_RIEG
767#define SLJIT_S390X_RILB(name, pattern, cond) \
768SLJIT_S390X_INSTRUCTION(name, sljit_gpr reg, sljit_sw ri) \
770 SLJIT_ASSERT(cond); \
772 return (pattern) | R36A(reg) | (sljit_ins)(ri & 0xffffffff); \
784#undef SLJIT_S390X_RILB
788 return 0x07f0 | target;
795 return 0xa7040000L | m1 | ri2;
802 return 0xc00400000000L | m1 | ri2;
808 return 0xb9830000 |
R8A(dst) |
R0A(src);
814 return 0xb2220000 |
R4A(dst);
820 return 0x0400 |
R4A(dst);
826 return risbhg(dst, src,
start, 0x8 |
end, rot);
829#undef SLJIT_S390X_INSTRUCTION
839 FAIL_IF(push_inst(compiler, brc(0xc, 2 + 2 + ((op &
SLJIT_32) ? 1 : 2) + 2 + 3 + 1)));
841 FAIL_IF(push_inst(compiler, (op &
SLJIT_32) ? or(dst_r, dst_r) : ogr(dst_r, dst_r)));
842 FAIL_IF(push_inst(compiler, brc(0x8, 2 + 3)));
843 FAIL_IF(push_inst(compiler, slfi(
tmp1, 0x10000000)));
853 return push_inst(compiler, lghi(target, (
sljit_s16)
v));
856 return push_inst(compiler, llill(target, (
sljit_u16)
v));
859 return push_inst(compiler, llilh(target, (
sljit_u16)(
v >> 16)));
862 return push_inst(compiler, llihl(target, (
sljit_u16)(
v >> 32)));
865 return push_inst(compiler, llihh(target, (
sljit_u16)(
v >> 48)));
868 return push_inst(compiler, lgfi(target, (
sljit_s32)
v));
871 return push_inst(compiler, llilf(target, (
sljit_u32)
v));
877 return push_inst(compiler, iihf(target, (
sljit_u32)(
v >> 32)));
896 base = gpr(mem & REG_MASK);
898 if (mem & OFFS_REG_MASK) {
899 index = gpr(OFFS_REG(mem));
909 FAIL_IF(push_load_imm_inst(compiler, tmp, off));
929 base = gpr(mem & REG_MASK);
931 if (mem & OFFS_REG_MASK) {
932 index = gpr(OFFS_REG(mem));
942 FAIL_IF(push_load_imm_inst(compiler, tmp, off));
952#define EVAL(op, r, addr) op(r, addr.offset, addr.index, addr.base)
953#define WHEN(cond, r, i1, i2, addr) \
954 (cond) ? EVAL(i1, r, addr) : EVAL(i2, r, addr)
965 if (is_32bit && ((mem & OFFS_REG_MASK) ||
is_u12(memw) || !
is_s20(memw))) {
986static const sljit_ins load_halfword_forms[3] = {
997 return load_store_op(compiler, dst_r, src, srcw, is_32bit, load_forms);
1012 ins = is_32bit ? 0xe30000000016 : 0xe30000000004 ;
1021 return load_store_op(compiler, src_r, dst, dstw, is_32bit, store_forms);
1035 return push_load_imm_inst(compiler, dst_r, srcw);
1038 return load_word(compiler, dst_r, src, srcw, (compiler->mode &
SLJIT_32) != 0);
1040 src_r = gpr(src & REG_MASK);
1041 return push_inst(compiler, (compiler->mode &
SLJIT_32) ? lr(dst_r, src_r) : lgr(dst_r, src_r));
1053 if (FAST_IS_REG(dst)) {
1058 else if (dst == src2) {
1065 FAIL_IF(emit_move(compiler, dst_r, src1, src1w));
1067 if (FAST_IS_REG(src2))
1072 FAIL_IF(push_inst(compiler, ins |
R4A(dst_r) |
R0A(src_r)));
1074 if (needs_move != 2)
1077 dst_r = gpr(dst & REG_MASK);
1078 return push_inst(compiler, (compiler->mode &
SLJIT_32) ? lr(dst_r,
tmp0) : lgr(dst_r,
tmp0));
1088 if (FAST_IS_REG(src1))
1093 return push_inst(compiler, ins |
R4A(dst_r) |
R0A(src_r));
1101 sljit_gpr dst_r = FAST_IS_REG(dst) ? gpr(dst & REG_MASK) :
tmp0;
1105 if (FAST_IS_REG(src1))
1110 if (FAST_IS_REG(src2))
1115 return push_inst(compiler, ins |
R4A(dst_r) |
R0A(src1_r) |
R12A(src2_r));
1132 if (FAST_IS_REG(dst)) {
1140 FAIL_IF(emit_move(compiler, dst_r, src1, src1w));
1143 return push_inst(compiler, ins |
R36A(dst_r) | (src2w & 0xffffffff));
1144 return push_inst(compiler, ins |
R20A(dst_r) | (src2w & 0xffff));
1155 if (!FAST_IS_REG(src1))
1158 src_r = gpr(src1 & REG_MASK);
1160 return push_inst(compiler, ins |
R36A(dst_r) |
R32A(src_r) | (
sljit_ins)(src2w & 0xffff) << 16);
1180 if (FAST_IS_REG(dst)) {
1185 else if (dst == (src2 & REG_MASK) || (dst == OFFS_REG(src2))) {
1192 FAIL_IF(emit_move(compiler, dst_r, src1, src1w));
1194 base = gpr(src2 & REG_MASK);
1197 if (src2 & OFFS_REG_MASK) {
1198 index = gpr(OFFS_REG(src2));
1206 FAIL_IF(push_load_imm_inst(compiler,
tmp1, src2w));
1208 if (src2 & REG_MASK)
1220 FAIL_IF(push_inst(compiler, ins));
1222 if (needs_move != 2)
1226 return push_inst(compiler, (compiler->mode &
SLJIT_32) ? lr(dst_r,
tmp0) : lgr(dst_r,
tmp0));
1237 if (dst & OFFS_REG_MASK) {
1240 if ((dstw & 0x3) == 0)
1241 index = gpr(OFFS_REG(dst));
1248 else if (!
is_s20(dstw)) {
1249 FAIL_IF(push_load_imm_inst(compiler,
tmp1, dstw));
1257 dst_r = gpr(dst & REG_MASK);
1259 return push_inst(compiler, ins | ((
sljit_ins)(srcw & 0xff) << 32) |
R28A(dst_r) | disp_s20((
sljit_s32)dstw));
1285 ins20 = forms->
op_y;
1289 ins20 = forms->
op_g;
1292 if (ins12 && ins20) {
1295 || ((src1 & OFFS_REG_MASK) ? (src1w & 0x3) == 0 :
is_s20(src1w)))) {
1296 if ((src2 & OFFS_REG_MASK) ||
is_u12(src2w) || !
is_s20(src2w))
1297 return emit_rx(compiler, ins12, dst, src1, src1w, src2, src2w,
RX_A);
1299 return emit_rx(compiler, ins20, dst, src1, src1w, src2, src2w,
RXY_A);
1303 if ((src1 & OFFS_REG_MASK) ||
is_u12(src1w) || !
is_s20(src1w))
1304 return emit_rx(compiler, ins12, dst, src2, src2w, src1, src1w,
RX_A);
1306 return emit_rx(compiler, ins20, dst, src2, src2w, src1, src1w,
RXY_A);
1309 else if (ins12 || ins20) {
1322 || ((src1 & OFFS_REG_MASK) ? (src1w & 0x3) == 0 : (rx_type ==
RX_A ?
is_u12(src1w) :
is_s20(src1w)))))
1323 return emit_rx(compiler, ins, dst, src1, src1w, src2, src2w, rx_type);
1326 return emit_rx(compiler, ins, dst, src2, src2w, src1, src1w, rx_type);
1332 ins_k = forms->
op_rk;
1341 if (ins && FAST_IS_REG(dst)) {
1343 return emit_rr(compiler, ins, dst, src1, src1w, src2, src2w);
1346 return emit_rr(compiler, ins, dst, src2, src2w, src1, src1w);
1350 return emit_rr(compiler, ins, dst, src1, src1w, src2, src2w);
1352 return emit_rrf(compiler, ins_k, dst, src1, src1w, src2, src2w);
1368 ins20 = forms->
op_y;
1372 ins20 = forms->
op_g;
1375 if (ins12 && ins20) {
1376 if ((src2 & OFFS_REG_MASK) ||
is_u12(src2w) || !
is_s20(src2w))
1377 return emit_rx(compiler, ins12, dst, src1, src1w, src2, src2w,
RX_A);
1379 return emit_rx(compiler, ins20, dst, src1, src1w, src2, src2w,
RXY_A);
1382 return emit_rx(compiler, ins12, dst, src1, src1w, src2, src2w,
RX_A);
1384 return emit_rx(compiler, ins20, dst, src1, src1w, src2, src2w,
RXY_A);
1389 if (ins == 0 || (FAST_IS_REG(dst) && dst == src1))
1390 return emit_rr(compiler, (
mode &
SLJIT_32) ? forms->
op_r : forms->
op_gr, dst, src1, src1w, src2, src2w);
1392 return emit_rrf(compiler, ins, dst, src1, src1w, src2, src2w);
1405 SLJIT_NEXT_DEFINE_TYPES;
1416 CHECK_PTR(check_sljit_generate_code(compiler));
1417 reverse_buf(compiler);
1419 jump = compiler->
jumps;
1420 while (jump !=
NULL) {
1427 pool_size +=
sizeof(*pool);
1428 if (!(jump->flags & JUMP_MOV_ADDR))
1434 const_ = compiler->
consts;
1436 pool_size +=
sizeof(*pool);
1437 const_ = const_->
next;
1442 pad_size = ((ins_size + 7UL) & ~7UL) - ins_size;
1446 code = (
sljit_u16*)allocate_executable_memory(ins_size + pad_size + pool_size,
options, exec_allocator_data, &executable_offset);
1460 label = compiler->
labels;
1461 jump = compiler->
jumps;
1462 const_ = compiler->
consts;
1463 SLJIT_NEXT_INIT_TYPES();
1464 SLJIT_GET_NEXT_MIN();
1468 buf_end = buf_ptr + (
buf->used_size >> 3);
1472 if (next_min_addr == half_count) {
1477 if (next_min_addr == next_label_size) {
1478 label->
u.
addr = (
sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
1479 label = label->
next;
1480 next_label_size = SLJIT_GET_NEXT_SIZE(label);
1483 if (next_min_addr == next_jump_addr) {
1485 source = (
sljit_sw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
1490 offset = (
sljit_sw)SLJIT_ADD_EXEC_OFFSET(pool_ptr, executable_offset) - source;
1503 source = (
sljit_sw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
1504 offset = (
sljit_sw)SLJIT_ADD_EXEC_OFFSET(pool_ptr, executable_offset) - source;
1517 arg = (ins >> 36) & 0xf;
1518 if (((ins >> 32) & 0xf) == 4) {
1533 next_jump_addr = SLJIT_GET_NEXT_ADDRESS(jump);
1534 }
else if (next_min_addr == next_const_addr) {
1553 next_const_addr = SLJIT_GET_NEXT_ADDRESS(
const_);
1556 SLJIT_GET_NEXT_MIN();
1559 if (ins & 0xffff00000000L) {
1564 if (ins & 0xffffffff0000L) {
1571 }
while (buf_ptr < buf_end);
1576 if (next_label_size == half_count) {
1577 label->
u.
addr = (
sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
1578 label = label->
next;
1587 jump = compiler->
jumps;
1588 while (jump !=
NULL) {
1589 offset = (
sljit_sw)((jump->flags & JUMP_ADDR) ? jump->u.target : jump->u.label->u.addr);
1596 offset -= (
sljit_sw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
1615 code = (
sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset);
1616 code_ptr = (
sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
1625 switch (feature_type) {
1627#ifdef SLJIT_IS_FPU_AVAILABLE
1647 return have_lscond1() ? 1 : 0;
1670 CHECK(check_sljit_emit_enter(compiler,
options, arg_types, scratches, saveds, fscratches, fsaveds, local_size));
1671 set_emit_enter(compiler,
options, arg_types, scratches, saveds, fscratches, fsaveds, local_size);
1676 offset = 2 * SSIZE_OF(sw);
1677 if (saveds + scratches >= SLJIT_NUMBER_OF_REGISTERS) {
1678 if (saved_arg_count == 0) {
1680 offset += 9 * SSIZE_OF(sw);
1683 offset += (8 - saved_arg_count) * SSIZE_OF(sw);
1694 if (saved_arg_count == 0) {
1700 offset += (saveds + 1) * SSIZE_OF(sw);
1702 }
else if (saveds > saved_arg_count) {
1703 if (saveds == saved_arg_count + 1) {
1708 offset += (saveds - saved_arg_count) * SSIZE_OF(sw);
1713 if (saved_arg_count > 0) {
1729 local_size = (local_size + SLJIT_S390X_DEFAULT_STACK_FRAME_SIZE + 0xf) & ~0xf;
1733 FAIL_IF(push_inst(compiler, 0xe30000000071 |
R36A(r15) |
R28A(r15) | disp_s20(-local_size)));
1741 saved_arg_count = 0;
1743 while (arg_types > 0) {
1763 CHECK(check_sljit_set_context(compiler,
options, arg_types, scratches, saveds, fscratches, fsaveds, local_size));
1764 set_set_context(compiler,
options, arg_types, scratches, saveds, fscratches, fsaveds, local_size);
1766 compiler->
local_size = (local_size + SLJIT_S390X_DEFAULT_STACK_FRAME_SIZE + 0xf) & ~0xf;
1780 else if (
is_s20(local_size))
1781 FAIL_IF(push_inst(compiler, 0xe30000000071 |
R36A(r15) |
R28A(r15) | disp_s20(local_size)));
1785 offset = 2 * SSIZE_OF(sw);
1786 if (saveds + scratches >= SLJIT_NUMBER_OF_REGISTERS) {
1787 if (kept_saveds_count == 0) {
1788 FAIL_IF(push_inst(compiler, lmg(r6, last_reg,
offset, r15)));
1789 offset += 9 * SSIZE_OF(sw);
1792 offset += (8 - kept_saveds_count) * SSIZE_OF(sw);
1803 if (kept_saveds_count == 0) {
1805 if (last_reg == r14)
1808 }
else if (saveds == 1 && last_reg == r13) {
1810 offset += 2 * SSIZE_OF(sw);
1813 offset += (saveds + 1) * SSIZE_OF(sw);
1815 }
else if (saveds > kept_saveds_count) {
1816 if (saveds == kept_saveds_count + 1) {
1821 offset += (saveds - kept_saveds_count) * SSIZE_OF(sw);
1826 if (kept_saveds_count > 0) {
1827 if (last_reg == r14)
1849 CHECK(check_sljit_emit_return_void(compiler));
1851 FAIL_IF(emit_stack_frame_release(compiler, r14));
1852 return push_inst(compiler, br(r14));
1859 CHECK(check_sljit_emit_return_to(compiler, src, srcw));
1862 ADJUST_LOCAL_OFFSET(src, srcw);
1863 FAIL_IF(load_word(compiler,
tmp1, src, srcw, 0 ));
1867 FAIL_IF(push_inst(compiler, lgr(
tmp1, gpr(src))));
1872 FAIL_IF(emit_stack_frame_release(compiler, r13));
1874 SLJIT_SKIP_CHECKS(compiler);
1888 CHECK(check_sljit_emit_op0(compiler, op));
1894 return push_inst(compiler, 0x0001 );
1896 return push_inst(compiler, 0x0700 );
1898 FAIL_IF(push_inst(compiler, mlgr(arg0, arg0)));
1903 FAIL_IF(push_inst(compiler, srag(
tmp0, arg0, 63, 0)));
1909 FAIL_IF(push_inst(compiler, mlgr(arg0, arg0)));
1921 return push_inst(compiler, lr(
arg1,
tmp0));
1931 return push_inst(compiler, lr(
arg1,
tmp0));
1941 return push_inst(compiler, lgr(
arg1,
tmp0));
1950 return push_inst(compiler, lgr(
arg1,
tmp0));
1963 return push_inst(compiler, lgr(
arg1,
tmp0));
1992 if (!is_ctz && dst_r !=
tmp0)
1993 return push_inst(compiler, 0xec00000000d9 |
R36A(dst_r) |
R32A(
tmp0) | ((
sljit_ins)(-32 & 0xffff) << 16));
2004 return push_inst(compiler, ((op &
SLJIT_32) ? 0x1800 : 0xb9040000 ) |
R4A(dst_r) |
R0A(
tmp0));
2019 FAIL_IF(load_store_op(compiler,
tmp0, src, srcw, op &
SLJIT_32, is_16bit ? load_halfword_forms : load_forms));
2027 ins = 0xe3000000003f ;
2029 ins = (op &
SLJIT_32) ? 0xe3000000003e : 0xe3000000002f ;
2040 ins = 0xe3000000001f ;
2042 ins = (op &
SLJIT_32) ? 0xe3000000001e : 0xe3000000000f ;
2057 return push_inst(compiler, ins |
R4A(reg) |
R0A(reg));
2060 ins = (op &
SLJIT_32) ? 0xb91f0000 : 0xb90f0000 ;
2061 FAIL_IF(push_inst(compiler, ins |
R4A(reg) |
R0A(gpr(src))));
2068 return push_inst(compiler, ins |
R4A(reg) |
R0A(reg));
2073 return push_inst(compiler, ins |
R20A(reg) | 16);
2076 ins = (opcode ==
SLJIT_REV_U16) ? 0xeb000000000c : 0xeb000000000a ;
2077 return push_inst(compiler, ins |
R36A(reg) |
R32A(reg) | (48 << 16));
2081#define WHEN2(cond, i1, i2) (cond) ? LEVAL(i1) : LEVAL(i2)
2094 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw));
2095 ADJUST_LOCAL_OFFSET(dst, dstw);
2096 ADJUST_LOCAL_OFFSET(src, srcw);
2100 if (FAST_IS_REG(dst) && FAST_IS_REG(src)) {
2103 switch (opcode | (op &
SLJIT_32)) {
2106 ins = llcr(dst_r, src_r);
2109 ins = lbr(dst_r, src_r);
2112 ins = llhr(dst_r, src_r);
2115 ins = lhr(dst_r, src_r);
2120 ins = lr(dst_r, src_r);
2124 ins = llgcr(dst_r, src_r);
2127 ins = lgbr(dst_r, src_r);
2130 ins = llghr(dst_r, src_r);
2133 ins = lghr(dst_r, src_r);
2136 ins = llgfr(dst_r, src_r);
2139 ins = lgfr(dst_r, src_r);
2145 ins = lgr(dst_r, src_r);
2152 FAIL_IF(push_inst(compiler, ins));
2156 if (FAST_IS_REG(dst) && src ==
SLJIT_IMM) {
2178 return push_load_imm_inst(compiler, gpr(dst), srcw);
2182 #define LEVAL(i) EVAL(i, reg, mem)
2183 if (FAST_IS_REG(dst) && (src &
SLJIT_MEM)) {
2186 FAIL_IF(make_addr_bxy(compiler, &mem, src, srcw,
tmp1));
2188 switch (opcode | (op &
SLJIT_32)) {
2231 FAIL_IF(push_inst(compiler, ins));
2241 FAIL_IF(push_load_imm_inst(compiler, reg, srcw));
2243 FAIL_IF(make_addr_bxy(compiler, &mem, dst, dstw,
tmp1));
2247 return push_inst(compiler,
2251 return push_inst(compiler,
2256 return push_inst(compiler,
2270 FAIL_IF(make_addr_bxy(compiler, &mem, src, srcw,
tmp1));
2276 FAIL_IF(make_addr_bxy(compiler, &mem, dst, dstw,
tmp1));
2277 return push_inst(compiler,
2283 FAIL_IF(make_addr_bxy(compiler, &mem, dst, dstw,
tmp1));
2284 return push_inst(compiler,
2291 FAIL_IF(make_addr_bxy(compiler, &mem, dst, dstw,
tmp1));
2292 return push_inst(compiler,
2298 FAIL_IF(make_addr_bxy(compiler, &mem, dst, dstw,
tmp1));
2311 dst_r = FAST_IS_REG(dst) ? gpr(dst) :
tmp0;
2312 src_r = FAST_IS_REG(src) ? gpr(src) :
tmp0;
2314 compiler->status_flags_state = op & (VARIABLE_FLAG_MASK |
SLJIT_SET_Z);
2321 FAIL_IF(load_unsigned_word(compiler, src_r, src, srcw, op &
SLJIT_32));
2323 FAIL_IF(sljit_emit_clz_ctz(compiler, op, dst_r, src_r));
2332 return sljit_emit_rev(compiler, op, dst, dstw, src, srcw);
2338 return store_word(compiler, dst_r, dst, dstw, op &
SLJIT_32);
2357static const struct ins_forms add_forms = {
2367static const struct ins_forms logical_add_forms = {
2388 if (!sets_zero_overflow &&
is_s8(src2w) && (src1 &
SLJIT_MEM) && (dst == src1 && dstw == src1w)) {
2390 ins = (
op &
SLJIT_32) ? 0xeb000000006a : 0xeb000000007a ;
2392 ins = (
op &
SLJIT_32) ? 0xeb000000006e : 0xeb000000007e ;
2393 return emit_siy(compiler, ins, dst, dstw, src2w);
2398 ins = (
op &
SLJIT_32) ? 0xec00000000d8 : 0xec00000000d9 ;
2400 ins = (
op &
SLJIT_32) ? 0xec00000000da : 0xec00000000db ;
2401 FAIL_IF(emit_rie_d(compiler, ins, dst, src1, src1w, src2w));
2405 if (!sets_overflow) {
2407 ins = (
op &
SLJIT_32) ? 0xc20b00000000 : 0xc20a00000000 ;
2408 FAIL_IF(emit_ri(compiler, ins, dst, src1, src1w, src2w,
RIL_A));
2412 FAIL_IF(emit_ri(compiler, 0xc20400000000 , dst, src1, src1w, -src2w,
RIL_A));
2417 ins = (
op &
SLJIT_32) ? 0xc20900000000 : 0xc20800000000 ;
2418 FAIL_IF(emit_ri(compiler, ins, dst, src1, src1w, src2w,
RIL_A));
2423 forms = sets_overflow ? &add_forms : &logical_add_forms;
2424 FAIL_IF(emit_commutative(compiler, forms, dst, src1, src1w, src2, src2w));
2427 if (sets_zero_overflow)
2428 FAIL_IF(update_zero_overflow(compiler,
op, FAST_IS_REG(dst) ? gpr(dst & REG_MASK) :
tmp0));
2436static const struct ins_forms sub_forms = {
2446static const struct ins_forms logical_sub_forms = {
2473 if (compare_signed || ((
op & VARIABLE_FLAG_MASK) == 0 &&
is_s32(src2w))) {
2475 ins = (
op &
SLJIT_32) ? 0xc20d00000000 : 0xc20c00000000 ;
2476 return emit_ri(compiler, ins, src1, src1, src1w, src2w,
RIL_A);
2481 ins = (
op &
SLJIT_32) ? 0xc20f00000000 : 0xc20e00000000 ;
2482 return emit_ri(compiler, ins, src1, src1, src1w, src2w,
RIL_A);
2485 return emit_rie_d(compiler, 0xec00000000db , (
sljit_s32)
tmp0, src1, src1w, src2w);
2490 ins = compare_signed ? 0x59000000 : 0x55000000 ;
2491 return emit_rx(compiler, ins, src1, src1, src1w, src2, src2w,
RX_A);
2495 ins = (
op &
SLJIT_32) ? 0xe30000000059 : 0xe30000000020 ;
2497 ins = (
op &
SLJIT_32) ? 0xe30000000055 : 0xe30000000021 ;
2498 return emit_rx(compiler, ins, src1, src1, src1w, src2, src2w,
RXY_A);
2502 ins = (
op &
SLJIT_32) ? 0x1900 : 0xb9200000 ;
2504 ins = (
op &
SLJIT_32) ? 0x1500 : 0xb9210000 ;
2505 return emit_rr(compiler, ins, src1, src1, src1w, src2, src2w);
2508 if (src1 ==
SLJIT_IMM && src1w == 0 && (flag_type == 0 || sets_signed)) {
2509 ins = (
op &
SLJIT_32) ? 0x1300 : 0xb9030000 ;
2510 FAIL_IF(emit_rr1(compiler, ins, dst, src2, src2w));
2517 if (sets_signed || neg_src2w != 0 || (
op & (
SLJIT_SET_Z | VARIABLE_FLAG_MASK)) == 0) {
2518 if (!sets_zero_overflow &&
is_s8(neg_src2w) && (src1 &
SLJIT_MEM) && (dst == src1 && dstw == src1w)) {
2520 ins = (
op &
SLJIT_32) ? 0xeb000000006a : 0xeb000000007a ;
2522 ins = (
op &
SLJIT_32) ? 0xeb000000006e : 0xeb000000007e ;
2523 return emit_siy(compiler, ins, dst, dstw, neg_src2w);
2528 ins = (
op &
SLJIT_32) ? 0xec00000000d8 : 0xec00000000d9 ;
2530 ins = (
op &
SLJIT_32) ? 0xec00000000da : 0xec00000000db ;
2531 FAIL_IF(emit_rie_d(compiler, ins, dst, src1, src1w, neg_src2w));
2538 ins = (
op &
SLJIT_32) ? 0xc20500000000 : 0xc20400000000 ;
2539 FAIL_IF(emit_ri(compiler, ins, dst, src1, src1w, src2w,
RIL_A));
2543 FAIL_IF(emit_ri(compiler, 0xc20a00000000 , dst, src1, src1w, neg_src2w,
RIL_A));
2548 ins = (
op &
SLJIT_32) ? 0xc20900000000 : 0xc20800000000 ;
2549 FAIL_IF(emit_ri(compiler, ins, dst, src1, src1w, neg_src2w,
RIL_A));
2554 forms = sets_signed ? &sub_forms : &logical_sub_forms;
2555 FAIL_IF(emit_non_commutative(compiler, forms, dst, src1, src1w, src2, src2w));
2559 sljit_gpr dst_r = FAST_IS_REG(dst) ? gpr(dst & REG_MASK) :
tmp0;
2571 FAIL_IF(update_zero_overflow(compiler,
op, dst_r));
2580static const struct ins_forms multiply_forms = {
2590static const struct ins_forms multiply_overflow_forms = {
2607 if (HAS_FLAGS(
op)) {
2619 return emit_commutative(compiler, &multiply_overflow_forms, dst, src1, src1w, src2, src2w);
2624 ins = (
op &
SLJIT_32) ? 0xa70c0000 : 0xa70d0000 ;
2625 return emit_ri(compiler, ins, dst, src1, src1w, src2w,
RI_A);
2629 ins = (
op &
SLJIT_32) ? 0xc20100000000 : 0xc20000000000 ;
2630 return emit_ri(compiler, ins, dst, src1, src1w, src2w,
RIL_A);
2634 return emit_commutative(compiler, &multiply_forms, dst, src1, src1w, src2, src2w);
2647 dst_r = gpr(dst & REG_MASK);
2653 FAIL_IF(emit_move(compiler, dst_r, src1, src1w));
2657 FAIL_IF(push_inst(compiler, 0xc00a00000000 |
R36A(dst_r) | (imm >> 32)));
2658 return push_inst(compiler, 0xc00b00000000 |
R36A(dst_r) | (imm & 0xffffffff));
2662 FAIL_IF(push_inst(compiler, 0xc00c00000000 |
R36A(dst_r) | (imm >> 32)));
2663 return push_inst(compiler, 0xc00d00000000 |
R36A(dst_r) | (imm & 0xffffffff));
2667 if ((imm & 0x00000000ffffffffull) == 0)
2668 return push_inst(compiler, 0xc00c00000000 |
R36A(dst_r) | (imm >> 32));
2669 if ((imm & 0xffffffff00000000ull) == 0)
2670 return push_inst(compiler, 0xc00d00000000 |
R36A(dst_r) | (imm & 0xffffffff));
2673 if ((imm & 0xffff000000000000ull) != 0)
2674 FAIL_IF(push_inst(compiler, 0xa5080000 |
R20A(dst_r) | (imm >> 48)));
2675 if ((imm & 0x0000ffff00000000ull) != 0)
2676 FAIL_IF(push_inst(compiler, 0xa5090000 |
R20A(dst_r) | ((imm >> 32) & 0xffff)));
2677 if ((imm & 0x00000000ffff0000ull) != 0)
2678 FAIL_IF(push_inst(compiler, 0xa50a0000 |
R20A(dst_r) | ((imm >> 16) & 0xffff)));
2679 if ((imm & 0x000000000000ffffull) != 0 || imm == 0)
2680 return push_inst(compiler, 0xa50b0000 |
R20A(dst_r) | (imm & 0xffff));
2684 if ((imm & 0xffffffff00000000ull) != 0)
2685 FAIL_IF(push_inst(compiler, 0xc00600000000 |
R36A(dst_r) | (imm >> 32)));
2686 if ((imm & 0x00000000ffffffffull) != 0 || imm == 0)
2687 return push_inst(compiler, 0xc00700000000 |
R36A(dst_r) | (imm & 0xffffffff));
2691static const struct ins_forms bitwise_and_forms = {
2701static const struct ins_forms bitwise_or_forms = {
2711static const struct ins_forms bitwise_xor_forms = {
2734 imm &= 0xffffffffull;
2736 if ((imm & 0x000000000000ffffull) != 0 || imm == 0)
2738 if ((imm & 0x00000000ffff0000ull) != 0)
2740 if ((imm & 0x0000ffff00000000ull) != 0)
2742 if ((imm & 0xffff000000000000ull) != 0)
2748 if (FAST_IS_REG(src1))
2749 src_r = gpr(src1 & REG_MASK);
2753 if ((imm & 0x000000000000ffffull) != 0 || imm == 0)
2754 return push_inst(compiler, 0xa7010000 |
R20A(src_r) | imm);
2755 if ((imm & 0x00000000ffff0000ull) != 0)
2756 return push_inst(compiler, 0xa7000000 |
R20A(src_r) | (imm >> 16));
2757 if ((imm & 0x0000ffff00000000ull) != 0)
2758 return push_inst(compiler, 0xa7030000 |
R20A(src_r) | (imm >> 32));
2759 return push_inst(compiler, 0xa7020000 |
R20A(src_r) | (imm >> 48));
2763 return sljit_emit_bitwise_imm(compiler,
type, dst, src1, src1w, imm, count16);
2767 forms = &bitwise_and_forms;
2769 forms = &bitwise_or_forms;
2771 forms = &bitwise_xor_forms;
2773 return emit_commutative(compiler, forms, dst, src1, src1w, src2, src2w);
2782 sljit_gpr dst_r = FAST_IS_REG(dst) ? gpr(dst & REG_MASK) :
tmp0;
2788 if (FAST_IS_REG(src1))
2794 if (FAST_IS_REG(src2))
2802 if (base_r !=
tmp1) {
2803 FAIL_IF(push_inst(compiler, 0xec0000000055 |
R36A(
tmp1) |
R32A(base_r) | (59 << 24) | (1 << 23) | (63 << 16)));
2822 ins = (
op &
SLJIT_32) ? 0xeb00000000df : 0xeb000000000d ;
2824 ins = (
op &
SLJIT_32) ? 0xeb00000000de : 0xeb000000000c ;
2826 ins = (
op &
SLJIT_32) ? 0xeb00000000dc : 0xeb000000000a ;
2828 FAIL_IF(push_inst(compiler, ins |
R36A(dst_r) |
R32A(src_r) |
R28A(base_r) | (imm << 16)));
2832 return push_inst(compiler, (
op &
SLJIT_32) ? or(dst_r, dst_r) : ogr(dst_r, dst_r));
2842 sljit_gpr dst_r = FAST_IS_REG(dst) ? gpr(dst & REG_MASK) :
tmp0;
2848 if (FAST_IS_REG(src1))
2854 if (FAST_IS_REG(src2))
2864 ins = (
op &
SLJIT_32) ? 0x1300 : 0xb9030000 ;
2874 ins = (
op &
SLJIT_32) ? 0xeb000000001d : 0xeb000000001c ;
2875 return push_inst(compiler, ins |
R36A(dst_r) |
R32A(src_r) |
R28A(base_r) | (imm << 16));
2878static const struct ins_forms addc_forms = {
2888static const struct ins_forms subc_forms = {
2904 CHECK(check_sljit_emit_op2(compiler,
op, 0, dst, dstw, src1, src1w, src2, src2w));
2905 ADJUST_LOCAL_OFFSET(dst, dstw);
2906 ADJUST_LOCAL_OFFSET(src1, src1w);
2907 ADJUST_LOCAL_OFFSET(src2, src2w);
2910 compiler->status_flags_state =
op & (VARIABLE_FLAG_MASK |
SLJIT_SET_Z);
2925 return sljit_emit_add(compiler,
op, dst, dstw, src1, src1w, src2, src2w);
2928 FAIL_IF(emit_commutative(compiler, &addc_forms, dst, src1, src1w, src2, src2w));
2934 return sljit_emit_sub(compiler,
op, dst, dstw, src1, src1w, src2, src2w);
2937 FAIL_IF(emit_non_commutative(compiler, &subc_forms, dst, src1, src1w, src2, src2w));
2942 FAIL_IF(sljit_emit_multiply(compiler,
op, dst, src1, src1w, src2, src2w));
2947 FAIL_IF(sljit_emit_bitwise(compiler,
op, dst, src1, src1w, src2, src2w));
2955 FAIL_IF(sljit_emit_shift(compiler,
op, dst, src1, src1w, src2, src2w));
2959 FAIL_IF(sljit_emit_rotate(compiler,
op, dst, src1, src1w, src2, src2w));
2975 CHECK(check_sljit_emit_op2(compiler,
op, 1, 0, 0, src1, src1w, src2, src2w));
2977 SLJIT_SKIP_CHECKS(compiler);
2987 CHECK(check_sljit_emit_op2r(compiler,
op, dst_reg, src1, src1w, src2, src2w));
2991 SLJIT_SKIP_CHECKS(compiler);
2993 return push_inst(compiler, ((
op &
SLJIT_32) ? 0x1a00 : 0xb9080000 ) |
R4A(gpr(dst_reg)) |
R0A(
tmp0));
3014 CHECK(check_sljit_emit_shift_into(compiler,
op, dst_reg, src1_reg, src2_reg, src3, src3w));
3018 if (src1_reg == src2_reg) {
3019 SLJIT_SKIP_CHECKS(compiler);
3023 ADJUST_LOCAL_OFFSET(src3, src3w);
3026 src3w &= bit_length - 1;
3032 if (dst_r == src1_r) {
3033 ins = is_right ? 0x88000000 : 0x89000000 ;
3036 ins = is_right ? 0xeb00000000de : 0xeb00000000df ;
3040 ins = is_right ? 0xeb000000000c : 0xeb000000000d ;
3044 ins = 0xec0000000055 ;
3047 src3w = bit_length - src3w;
3052 return push_inst(compiler, ins |
R36A(dst_r) |
R32A(src2_r));
3058 if (dst_r == src3_r) {
3067 if (src3_r !=
tmp1) {
3068 FAIL_IF(push_inst(compiler, 0xec0000000055 |
R36A(
tmp1) |
R32A(src3_r) | (59 << 24) | (1 << 23) | (63 << 16)));
3074 if (dst_r == src1_r) {
3075 ins = is_right ? 0x88000000 : 0x89000000 ;
3078 ins = is_right ? 0xeb00000000de : 0xeb00000000df ;
3082 if (src3_r !=
tmp1) {
3088 ins = is_right ? 0xeb00000000df : 0xeb00000000de ;
3091 return push_inst(compiler, 0x1600 |
R4A(dst_r) |
R0A(
tmp0));
3094 ins = is_right ? 0xeb000000000c : 0xeb000000000d ;
3097 ins = is_right ? 0xeb000000000d : 0xeb000000000c ;
3114 return push_inst(compiler, 0xb9810000 |
R4A(dst_r) |
R0A(
tmp0));
3124 CHECK(check_sljit_emit_op_src(compiler, op, src, srcw));
3125 ADJUST_LOCAL_OFFSET(src, srcw);
3129 src_r = FAST_IS_REG(src) ? gpr(src) :
tmp1;
3133 return push_inst(compiler, br(src_r));
3156 CHECK(check_sljit_emit_op_dst(compiler, op, dst, dstw));
3157 ADJUST_LOCAL_OFFSET(dst, dstw);
3161 if (FAST_IS_REG(dst))
3162 return push_inst(compiler, lgr(gpr(dst), link_r));
3165 dst_r = FAST_IS_REG(dst) ? gpr(dst) :
tmp0;
3173 return store_word(compiler, dst_r, dst, dstw, 0);
3180 CHECK_REG_INDEX(check_sljit_get_register_index(
type, reg));
3197 CHECK(check_sljit_emit_op_custom(compiler, instruction,
size));
3200 return push_inst(compiler, ins);
3208#define FLOAT_STORE 1
3219 if ((mem & OFFS_REG_MASK) ||
is_u12(memw) || !
is_s20(memw)) {
3223 ins = (op &
SLJIT_32) ? 0x70000000 : 0x60000000 ;
3225 ins = (op &
SLJIT_32) ? 0x78000000 : 0x68000000 ;
3233 ins = (op &
SLJIT_32) ? 0xed0000000066 : 0xed0000000067 ;
3235 ins = (op &
SLJIT_32) ? 0xed0000000064 : 0xed0000000065 ;
3247 return push_inst(compiler, ins_r |
F4(reg) |
F0(src));
3267 ins = (op &
SLJIT_32) ? 0xb3a85000 : 0xb3a95000 ;
3269 ins = (op &
SLJIT_32) ? 0xb3985000 : 0xb3995000 ;
3271 FAIL_IF(push_inst(compiler, ins |
R4A(dst_r) |
F0(src)));
3286 FAIL_IF(push_load_imm_inst(compiler,
tmp0, srcw));
3290 FAIL_IF(load_word(compiler,
tmp0, src, srcw, ins & 0x100000));
3294 FAIL_IF(push_inst(compiler, ins |
F4(dst_r) |
R0(src)));
3312 ins = (op &
SLJIT_32) ? 0xb3a40000 : 0xb3a50000 ;
3314 ins = (op &
SLJIT_32) ? 0xb3940000 : 0xb3950000 ;
3316 return sljit_emit_fop1_conv_f64_from_w(compiler, ins, dst, dstw, src, srcw);
3329 ins = (op &
SLJIT_32) ? 0xb3a00000 : 0xb3a10000 ;
3331 ins = (op &
SLJIT_32) ? 0xb3900000 : 0xb3910000 ;
3333 return sljit_emit_fop1_conv_f64_from_w(compiler, ins, dst, dstw, src, srcw);
3348 ins_r = 0xb3090000 ;
3349 ins = 0xed0000000009 ;
3351 ins_r = 0xb3190000 ;
3352 ins = 0xed0000000019 ;
3355 return emit_float(compiler, ins_r, ins, src1, src2, src2w);
3367 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw);
3369 dst_r = FAST_IS_REG(dst) ? dst :
TMP_FREG1;
3372 FAIL_IF(emit_float(compiler, 0xb3040000 , 0xed0000000004 , dst_r, src, srcw));
3381 if (FAST_IS_REG(dst)) {
3385 ins = (op &
SLJIT_32) ? 0x3800 : 0x2800 ;
3394 ins = (op &
SLJIT_32) ? 0xb3030000 : 0xb3130000 ;
3398 ins = (op &
SLJIT_32) ? 0xb3000000 : 0xb3100000 ;
3402 FAIL_IF(push_inst(compiler, ins |
F4(dst_r) |
F0(src)));
3411#define FLOAT_MOV(op, dst_r, src_r) \
3412 (((op & SLJIT_32) ? 0x3800 : 0x2800 ) | F4(dst_r) | F0(src_r))
3423 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
3424 ADJUST_LOCAL_OFFSET(dst, dstw);
3425 ADJUST_LOCAL_OFFSET(src1, src1w);
3426 ADJUST_LOCAL_OFFSET(src2, src2w);
3429 if (FAST_IS_REG(dst)) {
3456 ins_r = (op &
SLJIT_32) ? 0xb30a0000 : 0xb31a0000 ;
3457 ins = (op &
SLJIT_32) ? 0xed000000000a : 0xed000000001a ;
3460 ins_r = (op &
SLJIT_32) ? 0xb30b0000 : 0xb31b0000 ;
3461 ins = (op &
SLJIT_32) ? 0xed000000000b : 0xed000000001b ;
3464 ins_r = (op &
SLJIT_32) ? 0xb3170000 : 0xb31c0000 ;
3465 ins = (op &
SLJIT_32) ? 0xed0000000017 : 0xed000000001c ;
3469 ins_r = (op &
SLJIT_32) ? 0xb30d0000 : 0xb31d0000 ;
3470 ins = (op &
SLJIT_32) ? 0xed000000000d : 0xed000000001d ;
3474 FAIL_IF(emit_float(compiler, ins_r, ins, dst_r, src2, src2w));
3490 CHECK(check_sljit_emit_fop2r(compiler, op, dst_freg, src1, src1w, src2, src2w));
3491 ADJUST_LOCAL_OFFSET(src1, src1w);
3492 ADJUST_LOCAL_OFFSET(src2, src2w);
3500 reg = (dst_freg == src2) ?
TMP_FREG1 : dst_freg;
3505 return push_inst(compiler, 0xb3720000 |
F12(src2) |
F4(dst_freg) |
F0(src1));
3517 CHECK(check_sljit_emit_fset32(compiler, freg,
value));
3522 return push_inst(compiler, 0xb3c10000 |
F4(freg) |
R0A(
tmp1));
3534 CHECK(check_sljit_emit_fset64(compiler, freg,
value));
3539 return push_inst(compiler, 0xb3c10000 |
F4(freg) |
R0A(
tmp1));
3548 CHECK(check_sljit_emit_fcopy(compiler, op, freg, reg));
3558 return push_inst(compiler, 0xb3c10000 |
F4(freg) |
R0A(gen_r));
3561 FAIL_IF(push_inst(compiler, 0xb3cd0000 |
R4A(gen_r) |
F0(freg)));
3566 return push_inst(compiler, 0xeb000000000c |
R36A(gen_r) |
R32A(gen_r) | (32 << 16));
3578 CHECK_PTR(check_sljit_emit_label(compiler));
3585 set_label(label, compiler);
3595 CHECK_PTR(check_sljit_emit_jump(compiler,
type));
3601 jump->addr = compiler->
size;
3606 PTR_FAIL_IF(push_inst(compiler, brasl(link_r, 0)));
3618 CHECK_PTR(check_sljit_emit_call(compiler,
type, arg_types));
3621 PTR_FAIL_IF(emit_stack_frame_release(compiler, r14));
3625 SLJIT_SKIP_CHECKS(compiler);
3634 CHECK(check_sljit_emit_ijump(compiler,
type, src, srcw));
3638 FAIL_IF(push_load_imm_inst(compiler, src_r, srcw));
3641 ADJUST_LOCAL_OFFSET(src, srcw);
3642 FAIL_IF(load_word(compiler, src_r, src, srcw, 0 ));
3647 return push_inst(compiler, basr(link_r, src_r));
3649 return push_inst(compiler, br(src_r));
3659 CHECK(check_sljit_emit_icall(compiler,
type, arg_types, src, srcw));
3664 ADJUST_LOCAL_OFFSET(src, srcw);
3665 FAIL_IF(load_word(compiler,
tmp1, src, srcw, 0 ));
3672 FAIL_IF(push_inst(compiler, lgr(
tmp1, gpr(src))));
3677 FAIL_IF(emit_stack_frame_release(compiler, r14));
3681 SLJIT_SKIP_CHECKS(compiler);
3689 sljit_gpr dst_r = FAST_IS_REG(dst) ? gpr(dst & REG_MASK) :
tmp0;
3694 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw,
type));
3719 #define LEVAL(i) i(loc_r, 1, mask)
3720 if (have_lscond2()) {
3721 FAIL_IF(push_load_imm_inst(compiler, loc_r, 0));
3725 FAIL_IF(push_load_imm_inst(compiler, loc_r, 1));
3726 FAIL_IF(push_inst(compiler, brc(mask, 2 + 2)));
3727 FAIL_IF(push_load_imm_inst(compiler, loc_r, 0));
3733 #define LEVAL(i) i(dst_r, loc_r)
3751 return store_word(compiler, dst_r, dst, dstw, (op &
SLJIT_32));
3767 CHECK(check_sljit_emit_select(compiler,
type, dst_reg, src1, src1w, src2_reg));
3769 ADJUST_LOCAL_OFFSET(src1, src1w);
3771 if (dst_reg != src2_reg) {
3772 if (src1 == dst_reg) {
3777 if (ADDRESSING_DEPENDS_ON(src1, dst_reg)) {
3790 if (src1 & OFFS_REG_MASK) {
3791 src_r = gpr(OFFS_REG(src1));
3801 }
else if (!
is_s20(src1w)) {
3802 FAIL_IF(push_load_imm_inst(compiler,
tmp1, src1w));
3804 if (src1 & REG_MASK)
3810 src_r = gpr(src1 & REG_MASK);
3812 ins = (
type &
SLJIT_32) ? 0xeb00000000f2 : 0xeb00000000e2 ;
3813 return push_inst(compiler, ins |
R36A(dst_r) | (mask << 32) |
R28A(src_r) | disp_s20((
sljit_s32)src1w));
3820 if (have_lscond2() &&
is_s16(src1w)) {
3821 ins = (
type &
SLJIT_32) ? 0xec0000000042 : 0xec0000000046 ;
3822 return push_inst(compiler, ins |
R36A(dst_r) | (mask << 32) | (
sljit_ins)(src1w & 0xffff) << 16);
3825 FAIL_IF(push_load_imm_inst(compiler,
tmp1, src1w));
3831 return push_inst(compiler, ins | (mask << 12) |
R4A(dst_r) |
R0A(src_r));
3844 CHECK(check_sljit_emit_fselect(compiler,
type, dst_freg, src1, src1w, src2_freg));
3846 ADJUST_LOCAL_OFFSET(src1, src1w);
3848 if (dst_freg != src2_freg) {
3849 if (dst_freg == src1) {
3855 FAIL_IF(push_inst(compiler, ins |
F4(dst_freg) |
F0(src2_freg)));
3859 SLJIT_SKIP_CHECKS(compiler);
3865 FAIL_IF(push_inst(compiler, ins |
F4(dst_freg) |
F0(src1)));
3869 SLJIT_SKIP_CHECKS(compiler);
3881 sljit_ins ins, reg1, reg2, base, offs = 0;
3884 CHECK(check_sljit_emit_mem(compiler,
type, reg, mem, memw));
3886 if (!(reg & REG_PAIR_MASK))
3887 return sljit_emit_mem_unaligned(compiler,
type, reg, mem, memw);
3889 ADJUST_LOCAL_OFFSET(mem, memw);
3891 base = gpr(mem & REG_MASK);
3892 reg1 = gpr(REG_PAIR_FIRST(reg));
3893 reg2 = gpr(REG_PAIR_SECOND(reg));
3895 if (mem & OFFS_REG_MASK) {
3897 offs = gpr(OFFS_REG(mem));
3902 }
else if (!(
type &
SLJIT_MEM_STORE) && (base == reg1 || base == reg2) && (offs == reg1 || offs == reg2)) {
3909 }
else if (memw < -0x80000 || memw > 0x7ffff - ((reg2 == reg1 + 1) ? 0 : SSIZE_OF(sw))) {
3910 FAIL_IF(push_load_imm_inst(compiler,
tmp1, memw));
3920 if (offs == 0 && reg2 == (reg1 + 1)) {
3929 return push_inst(compiler, ins |
R36A(reg1) | disp_s20((
sljit_s32)memw));
3933 return push_inst(compiler, ins |
R36A(reg2) | disp_s20((
sljit_s32)memw + SSIZE_OF(sw)));
3947 CHECK(check_sljit_emit_simd_mov(compiler,
type, freg, srcdst, srcdstw));
3949 ADJUST_LOCAL_OFFSET(srcdst, srcdstw);
3962 ins =
F36(srcdst) |
F32(freg);
3964 ins =
F36(freg) |
F32(srcdst);
3966 return push_inst(compiler, 0xe70000000056 | ins);
3974 else if (alignment == 3)
3977 return push_inst(compiler, ((
type &
SLJIT_SIMD_STORE) ? 0xe7000000000e : 0xe70000000006 ) | ins);
3991 CHECK(check_sljit_emit_simd_replicate(compiler,
type, freg, src, srcw));
3993 ADJUST_LOCAL_OFFSET(src, srcw);
4006 return push_inst(compiler, 0xe70000000005 |
F36(freg)
4012 return push_inst(compiler, 0xe70000000044 |
F36(freg));
4014 return push_inst(compiler, 0xe7000000004d |
F36(freg) |
F32(src) | ((
sljit_ins)elem_size << 12));
4020 switch (elem_size) {
4044 if (sign_ext != 0x10000) {
4045 if (sign_ext == 0 || sign_ext == -1)
4046 return push_inst(compiler, 0xe70000000044 |
F36(freg)
4047 | (sign_ext == 0 ? 0 : ((
sljit_ins)0xffff << 16)));
4049 return push_inst(compiler, 0xe70000000045 |
F36(freg)
4053 push_load_imm_inst(compiler,
tmp0, srcw);
4059 return push_inst(compiler, 0xe7000000004d |
F36(freg) |
F32(freg) | ((
sljit_ins)elem_size << 12));
4073 CHECK(check_sljit_emit_simd_lane_mov(compiler,
type, freg, lane_index, srcdst, srcdstw));
4075 ADJUST_LOCAL_OFFSET(srcdst, srcdstw);
4092 if ((srcdst &
SLJIT_MEM) && lane_index == ((1 << (3 - elem_size)) - 1))
4093 return push_inst(compiler, 0xe70000000004 | ins | ((
sljit_ins)elem_size << 12));
4101 FAIL_IF(push_inst(compiler, 0xe70000000044 |
F36(freg)));
4105 switch (elem_size) {
4107 ins |= 0xe70000000000 ;
4110 ins |= 0xe70000000001 ;
4113 ins |= 0xe70000000003 ;
4116 ins |= 0xe70000000002 ;
4124 return push_inst(compiler, ins | ((
sljit_ins)lane_index << 12));
4129 return push_inst(compiler, 0xe7000000004d |
F36(srcdst) |
F32(freg) | ((
sljit_ins)lane_index << 16) | ((
sljit_ins)elem_size << 12));
4131 if (elem_size == 3) {
4132 if (lane_index == 0)
4133 ins =
F32(srcdst) |
F28(freg) | (1 << 12);
4135 ins =
F32(freg) |
F28(srcdst);
4137 return push_inst(compiler, 0xe70000000084 |
F36(freg) | ins);
4145 switch (elem_size) {
4147 ins = 0xe70000000040 ;
4151 ins = 0xe70000000041 ;
4157 ins = 0xe70000000043 ;
4159 srcdstw &= 0xffffffff;
4164 ins = 0xe70000000042 ;
4170 return push_inst(compiler, ins |
F36(freg) | ((
sljit_ins)srcdstw << 16) | ((
sljit_ins)lane_index << 12));
4172 push_load_imm_inst(compiler,
tmp0, srcdstw);
4180 return push_inst(compiler, 0xe70000000022 |
F36(freg) |
R32A(reg) | ins);
4182 FAIL_IF(push_inst(compiler, 0xe70000000021 |
R36A(reg) |
F32(freg) | ins));
4187 switch (elem_size) {
4199 return push_inst(compiler, ins |
R4A(reg) |
R0A(reg));
4210 CHECK(check_sljit_emit_simd_lane_replicate(compiler,
type, freg, src, src_lane_index));
4221 return push_inst(compiler, 0xe7000000004d |
F36(freg) |
F32(src)
4236 CHECK(check_sljit_emit_simd_extend(compiler,
type, freg, src, srcw));
4238 ADJUST_LOCAL_OFFSET(src, srcw);
4253 switch (elem2_size - elem_size) {
4255 ins |= 0xe70000000002 ;
4258 ins |= 0xe70000000003 ;
4261 ins |= 0xe70000000001 ;
4265 FAIL_IF(push_inst(compiler, ins));
4270 FAIL_IF(push_inst(compiler, 0xe700000000d5 |
F36(freg) |
F32(src) | (2 << 12)));
4271 FAIL_IF(push_inst(compiler, 0xe70000000030 |
F36(freg) |
F32(freg) | (32 << 16) | (3 << 12)));
4272 return push_inst(compiler, 0xe700000000c4 |
F36(freg) |
F32(freg) | (2 << 12));
4280 }
while (++elem_size < elem2_size);
4294 CHECK(check_sljit_emit_simd_sign(compiler,
type, freg, dst, dstw));
4296 ADJUST_LOCAL_OFFSET(dst, dstw);
4307 switch (elem_size) {
4309 push_load_imm_inst(compiler,
tmp0, (
sljit_sw)0x4048505860687078);
4310 push_load_imm_inst(compiler,
tmp1, (
sljit_sw)0x0008101820283038);
4314 push_load_imm_inst(compiler,
tmp0, (
sljit_sw)0x0010203040506070);
4317 push_load_imm_inst(compiler,
tmp0, (
sljit_sw)0x8080808000204060);
4320 push_load_imm_inst(compiler,
tmp0, (
sljit_sw)0x8080808080800040);
4329 dst_r = FAST_IS_REG(dst) ? gpr(dst) :
tmp0;
4331 | (elem_size == 0 ? ((3 << 16) | (1 << 12)) : (7 << 16))));
4347 CHECK(check_sljit_emit_simd_op2(compiler,
type, dst_freg, src1_freg, src2_freg));
4358 switch (SLJIT_SIMD_GET_OPCODE(
type)) {
4360 ins = 0xe70000000068 ;
4363 ins = 0xe7000000006a ;
4366 ins = 0xe7000000006d ;
4373 return push_inst(compiler, ins |
F36(dst_freg) |
F32(src1_freg) |
F28(src2_freg));
4381 CHECK(check_sljit_emit_atomic_load(compiler, op, dst_reg, mem_reg));
4383 SLJIT_SKIP_CHECKS(compiler);
4397 CHECK(check_sljit_emit_atomic_store(compiler, op, src_reg, mem_reg, temp_reg));
4402 return push_inst(compiler, 0xba000000 |
R20A(tmp_r) |
R16A(gpr(src_reg)) |
R12A(mem_r));
4410 return push_inst(compiler, 0xeb0000000030 |
R36A(tmp_r) |
R32A(gpr(src_reg)) |
R28A(mem_r));
4416 FAIL_IF(push_inst(compiler, 0xa7090000 |
R20A(tmp_r) | 0xfffc));
4421 FAIL_IF(push_inst(compiler, 0xb9800000 |
R4A(tmp_r) |
R0A(mem_r)));
4422 FAIL_IF(push_inst(compiler, 0xec0000000057 |
R36A(
tmp1) |
R32A(mem_r) | (59 << 24) | (60 << 16) | (3 << 8)));
4452 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw,
init_value));
4460 dst_r = FAST_IS_REG(dst) ? gpr(dst & REG_MASK) :
tmp0;
4469 PTR_FAIL_IF(store_word(compiler, dst_r, dst, dstw, 0 ));
4497 CHECK_PTR(check_sljit_emit_mov_addr(compiler, dst, dstw));
4498 ADJUST_LOCAL_OFFSET(dst, dstw);
4502 set_mov_addr(jump, compiler, 0);
4504 dst_r = FAST_IS_REG(dst) ? gpr(dst & REG_MASK) :
tmp0;
4514 PTR_FAIL_IF(store_word(compiler, dst_r, dst, dstw, 0));
dl(string $extension_filename)
zend_ffi_ctype_name_buf buf
unsigned const char * end
PHP_JSON_API size_t int options
#define SLJIT_UNREACHABLE()
unsigned short int sljit_u16
signed short int sljit_s16
#define SLJIT_UNLIKELY(x)
#define SLJIT_API_FUNC_ATTRIBUTE
#define SLJIT_UNUSED_ARG(arg)
#define SLJIT_CACHE_FLUSH(from, to)
#define SLJIT_UPDATE_WX_FLAGS(from, to, enable_exec)
#define PTR_FAIL_IF(expr)
#define PTR_FAIL_WITH_EXEC_IF(ptr)
#define CHECK_ERROR_PTR()
#define SLJIT_UNORDERED_OR_LESS_EQUAL
#define SLJIT_SKIP_FRAMES_BEFORE_FAST_RETURN
#define SLJIT_ARG_TYPE_SCRATCH_REG
#define SLJIT_SIMD_OP2_AND
#define SLJIT_ORDERED_LESS_EQUAL
#define SLJIT_CONV_F64_FROM_S32
#define SLJIT_CONV_S32_FROM_F64
#define SLJIT_FAST_RETURN
#define SLJIT_ATOMIC_NOT_STORED
#define SLJIT_SET_OVERFLOW
#define SLJIT_FIRST_SAVED_REG
#define SLJIT_CONV_F64_FROM_U32
#define SLJIT_UNORDERED_OR_GREATER
#define SLJIT_ORDERED_GREATER_EQUAL
#define SLJIT_PREFETCH_L3
#define SLJIT_SIG_GREATER_EQUAL
#define SLJIT_CURRENT_FLAGS_COMPARE
#define SLJIT_UNORDERED_OR_NOT_EQUAL
#define SLJIT_ARG_TYPE_F64
#define SLJIT_SIMD_EXTEND_SIGNED
#define SLJIT_PREFETCH_L1
#define SLJIT_SIMD_OP2_XOR
#define SLJIT_ORDERED_EQUAL
#define SLJIT_ERR_UNSUPPORTED
#define SLJIT_UNORDERED_OR_LESS
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label *label)
#define SLJIT_ORDERED_GREATER
#define SLJIT_SIG_LESS_EQUAL
#define SLJIT_UNORDERED_OR_EQUAL
#define SLJIT_CALL_RETURN
#define SLJIT_REWRITABLE_JUMP
#define SLJIT_NOT_OVERFLOW
#define SLJIT_F_NOT_EQUAL
#define SLJIT_F_GREATER_EQUAL
#define SLJIT_CONV_SW_FROM_F64
#define SLJIT_CURRENT_FLAGS_ADD
#define SLJIT_HAS_PREFETCH
#define SLJIT_ENTER_REG_ARG
#define SLJIT_SIG_GREATER
#define SLJIT_SIMD_LANE_ZERO
#define SLJIT_FLOAT_REGISTER
#define SLJIT_ATOMIC_STORED
#define SLJIT_GET_RETURN_ADDRESS
#define SLJIT_FIRST_SAVED_FLOAT_REG
#define SLJIT_SIMD_OP2_OR
#define SLJIT_CONV_F64_FROM_SW
#define SLJIT_SHIFT_INTO_NON_ZERO
#define SLJIT_SIMD_LANE_SIGNED
#define SLJIT_GREATER_EQUAL
#define SLJIT_GP_REGISTER
#define SLJIT_SKIP_FRAMES_BEFORE_RETURN
#define SLJIT_ERR_COMPILED
#define SLJIT_HAS_COPY_F64
#define SLJIT_F_LESS_EQUAL
#define SLJIT_CONV_F32_FROM_F64
#define SLJIT_ORDERED_LESS
#define SLJIT_HAS_COPY_F32
#define SLJIT_CONV_F64_FROM_F32
#define SLJIT_COPY_TO_F64
#define SLJIT_PREFETCH_L2
#define SLJIT_CURRENT_FLAGS_SUB
#define SLJIT_PREFETCH_ONCE
#define SLJIT_ORDERED_NOT_EQUAL
#define SLJIT_CONV_F64_FROM_UW
#define SLJIT_UNORDERED_OR_GREATER_EQUAL
#define SLJIT_IS_FPU_AVAILABLE
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 type)
SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump * sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump * sljit_emit_call(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 arg_types)
#define LOAD_STORE_ON_CONDITION_2_FACILITY
#define STORE_FACILITY_LIST_EXTENDED_FACILITY
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2r(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst_reg, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w)
#define SLJIT_S390X_RXA(name, pattern)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_select(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 dst_reg, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2_reg)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 reg, sljit_s32 mem, sljit_sw memw)
#define SLJIT_S390X_RSYA(name, pattern, cond)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_to(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
SLJIT_API_FUNC_ATTRIBUTE const char * sljit_get_platform_name(void)
#define EXTENDED_IMMEDIATE_FACILITY
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type)
SLJIT_API_FUNC_ATTRIBUTE void * sljit_generate_code(struct sljit_compiler *compiler, sljit_s32 options, void *exec_allocator_data)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w)
#define SLJIT_S390X_INSTRUCTION(op,...)
#define MISCELLANEOUS_INSTRUCTION_EXTENSIONS_1_FACILITY
#define SLJIT_S390X_RRFC(name, pattern)
#define DISTINCT_OPERAND_FACILITY
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_cmp_info(sljit_s32 type)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_atomic_load(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst_reg, sljit_s32 mem_reg)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 type, sljit_s32 reg)
#define MISCELLANEOUS_INSTRUCTION_EXTENSIONS_2_FACILITY
SLJIT_API_FUNC_ATTRIBUTE struct sljit_const * sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_replicate(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 freg, sljit_s32 src, sljit_sw srcw)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_op2(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 dst_freg, sljit_s32 src1_freg, sljit_s32 src2_freg)
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset)
#define SLJIT_ADD_SUB_NO_COMPARE(status_flags_state)
SLJIT_API_FUNC_ATTRIBUTE struct sljit_label * sljit_emit_label(struct sljit_compiler *compiler)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fset32(struct sljit_compiler *compiler, sljit_s32 freg, sljit_f32 value)
#define LOAD_STORE_ON_CONDITION_1_FACILITY
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fcopy(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 freg, sljit_s32 reg)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2r(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst_freg, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w)
#define GENERAL_INSTRUCTION_EXTENSION_FACILITY
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler)
#define SLJIT_S390X_RILA(name, pattern, imm_type)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler, sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_lane_mov(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 freg, sljit_s32 lane_index, sljit_s32 srcdst, sljit_sw srcdstw)
SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump * sljit_emit_mov_addr(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
#define SLJIT_S390X_RIA(name, pattern, imm_type)
#define HAVE_FACILITY(name, bit)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 src, sljit_sw srcw)
#define FLOAT_MOV(op, dst_r, src_r)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_shift_into(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst_reg, sljit_s32 src1_reg, sljit_s32 src2_reg, sljit_s32 src3, sljit_sw src3w)
#define SLJIT_S390X_RILB(name, pattern, cond)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_extend(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 freg, sljit_s32 src, sljit_sw srcw)
#define SLJIT_S390X_RIEG(name, pattern)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler, sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
#define EVAL(op, r, addr)
#define SLJIT_S390X_RRE(name, pattern)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_mov(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 freg, sljit_s32 srcdst, sljit_sw srcdstw)
#define WHEN2(cond, i1, i2)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fset64(struct sljit_compiler *compiler, sljit_s32 freg, sljit_f64 value)
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_dst(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw)
#define SLJIT_S390X_RR(name, pattern)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_atomic_store(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src_reg, sljit_s32 mem_reg, sljit_s32 temp_reg)
#define VECTOR_ENHANCEMENTS_1_FACILITY
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fselect(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 dst_freg, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2_freg)
#define FAST_LONG_DISPLACEMENT_FACILITY
#define SLJIT_S390X_RXYA(name, pattern, cond)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_sign(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 freg, sljit_s32 dst, sljit_sw dstw)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, void *instruction, sljit_u32 size)
#define SLJIT_S390X_RIEF(name, pattern)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 arg_types, sljit_s32 src, sljit_sw srcw)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 src, sljit_sw srcw)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_lane_replicate(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 freg, sljit_s32 src, sljit_s32 src_lane_index)
struct sljit_const * consts
sljit_sw executable_offset
struct sljit_jump * jumps
struct sljit_label * last_label
struct sljit_memory_fragment * buf
struct sljit_label * labels
struct sljit_const * next
struct sljit_label * label
struct sljit_label * next
union sljit_label::@034003116150245300057154161307153110213245130244 u
struct sljit_const const_