29 return "SPARC" SLJIT_CPUINFO;
36 #if (defined SLJIT_CACHE_FLUSH_OWN_IMPL && SLJIT_CACHE_FLUSH_OWN_IMPL)
40 #if defined(__SUNPRO_C) && __SUNPRO_C < 0x590
90 #define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
91 #define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3)
92 #define TMP_REG3 (SLJIT_NUMBER_OF_REGISTERS + 4)
95 #define TMP_LINK (SLJIT_NUMBER_OF_REGISTERS + 5)
97 #define TMP_FREG1 (SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1)
98 #define TMP_FREG2 (SLJIT_NUMBER_OF_FLOAT_REGISTERS + 2)
101 0, 8, 9, 10, 11, 23, 22, 21, 20, 19, 18, 17, 16, 29, 28, 27, 26, 25, 24, 14, 1, 12, 13, 15
105 0, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30
112 #define D(d) ((sljit_ins)reg_map[d] << 25)
113 #define FD(d) ((sljit_ins)freg_map[d] << 25)
114 #define FDN(d) (((sljit_ins)freg_map[d] | 0x1) << 25)
115 #define DA(d) ((sljit_ins)(d) << 25)
116 #define S1(s1) ((sljit_ins)reg_map[s1] << 14)
117 #define FS1(s1) ((sljit_ins)freg_map[s1] << 14)
118 #define S1A(s1) ((sljit_ins)(s1) << 14)
119 #define S2(s2) ((sljit_ins)reg_map[s2])
120 #define FS2(s2) ((sljit_ins)freg_map[s2])
121 #define FS2N(s2) ((sljit_ins)freg_map[s2] | 0x1)
122 #define S2A(s2) ((sljit_ins)(s2))
123 #define IMM_ARG 0x2000
124 #define DOP(op) ((sljit_ins)(op) << 5)
125 #define IMM(imm) (((sljit_ins)(imm) & 0x1fff) | IMM_ARG)
127 #define DR(dr) (reg_map[dr])
128 #define DRF(dr, flags) ((sljit_s32)(reg_map[dr] | ((flags) & SET_FLAGS)))
129 #define OPC1(opcode) ((sljit_ins)(opcode) << 30)
130 #define OPC2(opcode) ((sljit_ins)(opcode) << 22)
131 #define OPC3(opcode) ((sljit_ins)(opcode) << 19)
132 #define SET_FLAGS OPC3(0x10)
134 #define ADD (OPC1(0x2) | OPC3(0x00))
135 #define ADDC (OPC1(0x2) | OPC3(0x08))
136 #define AND (OPC1(0x2) | OPC3(0x01))
137 #define ANDN (OPC1(0x2) | OPC3(0x05))
138 #define CALL (OPC1(0x1))
139 #define FABSS (OPC1(0x2) | OPC3(0x34) | DOP(0x09))
140 #define FADDD (OPC1(0x2) | OPC3(0x34) | DOP(0x42))
141 #define FADDS (OPC1(0x2) | OPC3(0x34) | DOP(0x41))
142 #define FCMPD (OPC1(0x2) | OPC3(0x35) | DOP(0x52))
143 #define FCMPS (OPC1(0x2) | OPC3(0x35) | DOP(0x51))
144 #define FDIVD (OPC1(0x2) | OPC3(0x34) | DOP(0x4e))
145 #define FDIVS (OPC1(0x2) | OPC3(0x34) | DOP(0x4d))
146 #define FDTOI (OPC1(0x2) | OPC3(0x34) | DOP(0xd2))
147 #define FDTOS (OPC1(0x2) | OPC3(0x34) | DOP(0xc6))
148 #define FITOD (OPC1(0x2) | OPC3(0x34) | DOP(0xc8))
149 #define FITOS (OPC1(0x2) | OPC3(0x34) | DOP(0xc4))
150 #define FMOVS (OPC1(0x2) | OPC3(0x34) | DOP(0x01))
151 #define FMULD (OPC1(0x2) | OPC3(0x34) | DOP(0x4a))
152 #define FMULS (OPC1(0x2) | OPC3(0x34) | DOP(0x49))
153 #define FNEGS (OPC1(0x2) | OPC3(0x34) | DOP(0x05))
154 #define FSTOD (OPC1(0x2) | OPC3(0x34) | DOP(0xc9))
155 #define FSTOI (OPC1(0x2) | OPC3(0x34) | DOP(0xd1))
156 #define FSUBD (OPC1(0x2) | OPC3(0x34) | DOP(0x46))
157 #define FSUBS (OPC1(0x2) | OPC3(0x34) | DOP(0x45))
158 #define JMPL (OPC1(0x2) | OPC3(0x38))
159 #define LDD (OPC1(0x3) | OPC3(0x03))
160 #define LDDF (OPC1(0x3) | OPC3(0x23))
161 #define LDF (OPC1(0x3) | OPC3(0x20))
162 #define LDUW (OPC1(0x3) | OPC3(0x00))
163 #define NOP (OPC1(0x0) | OPC2(0x04))
164 #define OR (OPC1(0x2) | OPC3(0x02))
165 #define ORN (OPC1(0x2) | OPC3(0x06))
166 #define RDY (OPC1(0x2) | OPC3(0x28) | S1A(0))
167 #define RESTORE (OPC1(0x2) | OPC3(0x3d))
168 #define SAVE (OPC1(0x2) | OPC3(0x3c))
169 #define SETHI (OPC1(0x0) | OPC2(0x04))
170 #define SLL (OPC1(0x2) | OPC3(0x25))
171 #define SLLX (OPC1(0x2) | OPC3(0x25) | (1 << 12))
172 #define SRA (OPC1(0x2) | OPC3(0x27))
173 #define SRAX (OPC1(0x2) | OPC3(0x27) | (1 << 12))
174 #define SRL (OPC1(0x2) | OPC3(0x26))
175 #define SRLX (OPC1(0x2) | OPC3(0x26) | (1 << 12))
176 #define STD (OPC1(0x3) | OPC3(0x07))
177 #define STDF (OPC1(0x3) | OPC3(0x27))
178 #define STF (OPC1(0x3) | OPC3(0x24))
179 #define STW (OPC1(0x3) | OPC3(0x04))
180 #define SUB (OPC1(0x2) | OPC3(0x04))
181 #define SUBC (OPC1(0x2) | OPC3(0x0c))
182 #define TA (OPC1(0x2) | OPC3(0x3a) | (8 << 25))
183 #define WRY (OPC1(0x2) | OPC3(0x30) | DA(0))
184 #define XOR (OPC1(0x2) | OPC3(0x03))
185 #define XNOR (OPC1(0x2) | OPC3(0x07))
187 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
188 #define MAX_DISP (0x1fffff)
189 #define MIN_DISP (-0x200000)
190 #define DISP_MASK ((sljit_ins)0x3fffff)
192 #define BICC (OPC1(0x0) | OPC2(0x2))
193 #define FBFCC (OPC1(0x0) | OPC2(0x6))
195 #define SDIV (OPC1(0x2) | OPC3(0x0f))
196 #define SMUL (OPC1(0x2) | OPC3(0x0b))
197 #define UDIV (OPC1(0x2) | OPC3(0x0e))
198 #define UMUL (OPC1(0x2) | OPC3(0x0a))
203 #define SIMM_MAX (0x0fff)
204 #define SIMM_MIN (-0x1000)
211 SLJIT_ASSERT((delay_slot & DST_INS_MASK) == UNMOVABLE_INS
212 || (delay_slot & DST_INS_MASK) == MOVABLE_INS
213 || (delay_slot & DST_INS_MASK) == ((ins >> 25) & 0x1f));
218 compiler->delay_slot = delay_slot;
232 if (jump->
flags & JUMP_ADDR)
240 #
if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
241 if (jump->
flags & IS_CALL) {
243 jump->
flags |= PATCH_CALL;
244 if (jump->
flags & IS_MOVABLE) {
256 #error "Implementation required"
259 if (jump->
flags & IS_COND)
262 diff = ((
sljit_sw)target_addr - (
sljit_sw)(inst - 1) - executable_offset) >> 2;
264 if (jump->
flags & IS_MOVABLE) {
265 if (diff <= MAX_DISP && diff >= MIN_DISP) {
266 jump->
flags |= PATCH_B;
268 if (jump->
flags & IS_COND) {
269 saved_inst = inst[0];
270 inst[0] = inst[1] ^ (1 << 28);
271 inst[1] = saved_inst;
274 inst[0] = BICC |
DA(0x8);
281 diff += SSIZE_OF(ins);
283 if (diff <= MAX_DISP && diff >= MIN_DISP) {
284 jump->
flags |= PATCH_B;
285 if (jump->
flags & IS_COND)
286 inst[0] ^= (1 << 28);
288 inst[0] = BICC |
DA(0x8);
315 CHECK_PTR(check_sljit_generate_code(compiler));
316 reverse_buf(compiler);
325 executable_offset = SLJIT_EXEC_OFFSET(
code);
328 jump = compiler->
jumps;
334 buf_end = buf_ptr + (
buf->used_size >> 2);
336 *code_ptr = *buf_ptr++;
337 if (next_addr == word_count) {
346 label->addr = (
sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
350 if (jump && jump->
addr == word_count) {
351 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
356 code_ptr = detect_jump_type(jump, code_ptr,
code, executable_offset);
364 if (put_label && put_label->
addr == word_count) {
367 put_label = put_label->
next;
369 next_addr = compute_next_addr(
label, jump,
const_, put_label);
373 }
while (buf_ptr < buf_end);
379 label->addr = (
sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
390 jump = compiler->
jumps;
396 if (jump->
flags & PATCH_CALL) {
397 addr = (
addr - (
sljit_sw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2;
402 if (jump->
flags & PATCH_B) {
403 addr = (
addr - (
sljit_sw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2;
405 buf_ptr[0] = (buf_ptr[0] & ~DISP_MASK) | ((
sljit_ins)
addr & DISP_MASK);
410 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
411 SLJIT_ASSERT(((buf_ptr[0] & 0xc1cfffff) == 0x01000000) && ((buf_ptr[1] & 0xc1f83fff) == 0x80102000));
415 #error "Implementation required"
426 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
427 SLJIT_ASSERT(((buf_ptr[0] & 0xc1cfffff) == 0x01000000) && ((buf_ptr[1] & 0xc1f83fff) == 0x80102000));
428 buf_ptr[0] |= (
addr >> 10) & 0x3fffff;
429 buf_ptr[1] |=
addr & 0x3ff;
431 #error "Implementation required"
433 put_label = put_label->
next;
441 code_ptr = (
sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
450 switch (feature_type) {
452 #ifdef SLJIT_IS_FPU_AVAILABLE
462 #if (defined SLJIT_CONFIG_SPARC_64 && SLJIT_CONFIG_SPARC_64)
477 #define LOAD_DATA 0x01
478 #define WORD_DATA 0x00
479 #define BYTE_DATA 0x02
480 #define HALF_DATA 0x04
481 #define INT_DATA 0x06
482 #define SIGNED_DATA 0x08
485 #define DOUBLE_DATA 0x10
486 #define SINGLE_DATA 0x12
488 #define MEM_MASK 0x1f
490 #define ARG_TEST 0x00020
491 #define ALT_KEEP_CACHE 0x00040
492 #define CUMULATIVE_OP 0x00080
493 #define IMM_OP 0x00100
494 #define MOVE_OP 0x00200
495 #define SRC2_IMM 0x00400
497 #define REG_DEST 0x00800
498 #define REG2_SOURCE 0x01000
499 #define SLOW_SRC1 0x02000
500 #define SLOW_SRC2 0x04000
501 #define SLOW_DEST 0x08000
505 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
508 #include "sljitNativeSPARC_64.c"
517 sljit_s32 saved_arg_index, scratch_arg_index, float_arg_index;
520 CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size));
521 set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size);
537 float_offset = 16 *
sizeof(
sljit_sw);
540 while (
types && reg_index < 24 + 6) {
541 switch (
types & SLJIT_ARG_MASK) {
543 if (reg_index & 0x1) {
545 if (reg_index >= 24 + 6 - 1)
564 args_offset = (16 + 1 + 6) *
sizeof(
sljit_sw);
565 float_offset = 16 *
sizeof(
sljit_sw);
567 saved_arg_index = 24;
568 scratch_arg_index = 8 - 1;
572 switch (arg_types & SLJIT_ARG_MASK) {
574 if (reg_index < 24 + 6 - 1) {
576 }
else if (reg_index < 24 + 6) {
578 FAIL_IF(push_inst(compiler,
LDF |
FD(float_arg_index) | (1 << 25) |
S1A(30) |
IMM(args_offset), MOVABLE_INS));
580 FAIL_IF(push_inst(compiler,
LDF |
FD(float_arg_index) |
S1A(30) |
IMM(args_offset), MOVABLE_INS));
581 FAIL_IF(push_inst(compiler,
LDF |
FD(float_arg_index) | (1 << 25) |
S1A(30) |
IMM(args_offset +
sizeof(
sljit_sw)), MOVABLE_INS));
589 if (reg_index < 24 + 6)
592 FAIL_IF(push_inst(compiler,
LDF |
FD(float_arg_index) |
S1A(30) |
IMM(args_offset), MOVABLE_INS));
600 tmp = saved_arg_index++;
601 if (tmp == reg_index)
604 tmp = scratch_arg_index;
606 if (reg_index < 24 + 6)
625 CHECK(check_sljit_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size));
626 set_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size);
635 CHECK(check_sljit_emit_return_void(compiler));
644 CHECK(check_sljit_emit_return(compiler,
op,
src, srcw));
646 if (TYPE_CAST_NEEDED(
op) || !FAST_IS_REG(
src)) {
647 FAIL_IF(emit_mov_before_return(compiler,
op,
src, srcw));
659 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
660 #define ARCH_32_64(a, b) a
662 #define ARCH_32_64(a, b) b
665 static const sljit_ins data_transfer_insts[16 + 4] = {
697 if ((!(
arg & OFFS_REG_MASK) && argw <= SIMM_MAX && argw >=
SIMM_MIN)
698 || ((
arg & OFFS_REG_MASK) && (argw & 0x3) == 0)) {
704 |
S1(
arg & REG_MASK) | ((
arg & OFFS_REG_MASK) ?
S2(OFFS_REG(
arg)) :
IMM(argw)),
719 if (
arg & OFFS_REG_MASK) {
723 if ((
arg & OFFS_REG_MASK) == (next_arg & OFFS_REG_MASK) && argw == next_argw)
750 if (((
SLJIT_MEM | (
arg & OFFS_REG_MASK)) == compiler->cache_arg) && (argw == compiler->cache_argw))
753 if ((
arg & OFFS_REG_MASK) == (next_arg & OFFS_REG_MASK) && argw == (next_argw & 0x3)) {
754 compiler->cache_arg =
SLJIT_MEM | (
arg & OFFS_REG_MASK);
755 compiler->cache_argw = argw;
767 if ((compiler->cache_arg ==
SLJIT_MEM) && (argw - compiler->cache_argw) <=
SIMM_MAX && (argw - compiler->cache_argw) >=
SIMM_MIN) {
768 if (argw != compiler->cache_argw) {
770 compiler->cache_argw = argw;
776 compiler->cache_argw = argw;
796 if (getput_arg_fast(compiler,
flags, reg,
arg, argw))
797 return compiler->
error;
798 compiler->cache_arg = 0;
799 compiler->cache_argw = 0;
800 return getput_arg(compiler,
flags, reg,
arg, argw, 0, 0);
805 if (getput_arg_fast(compiler,
flags, reg,
arg1, arg1w))
806 return compiler->
error;
807 return getput_arg(compiler,
flags, reg,
arg1, arg1w,
arg2, arg2w);
825 compiler->cache_arg = 0;
826 compiler->cache_argw = 0;
830 if (FAST_IS_REG(
dst)) {
842 if (src2w <= SIMM_MAX && src2w >=
SIMM_MIN) {
848 if (src1w <= SIMM_MAX && src1w >=
SIMM_MIN) {
862 if (FAST_IS_REG(src1))
881 if (FAST_IS_REG(src2)) {
890 FAIL_IF(load_immediate(compiler, sugg_src2_r, src2w));
891 src2_r = sugg_src2_r;
905 if (getput_arg_fast(compiler,
flags |
LOAD_DATA, sugg_src2_r, src2, src2w))
909 src2_r = sugg_src2_r;
914 if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w,
dst, dstw)) {
928 FAIL_IF(emit_single_op(compiler,
op,
flags, dst_r, src1_r, src2_r));
932 getput_arg_fast(compiler,
flags, dst_r,
dst, dstw);
933 return compiler->
error;
935 return getput_arg(compiler,
flags, dst_r,
dst, dstw, 0, 0);
944 CHECK(check_sljit_emit_op0(compiler,
op));
949 return push_inst(compiler,
TA, UNMOVABLE_INS);
951 return push_inst(compiler,
NOP, UNMOVABLE_INS);
954 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
958 #error "Implementation required"
965 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
980 #error "Implementation required"
997 CHECK(check_sljit_emit_op1(compiler,
op,
dst, dstw,
src, srcw));
998 ADJUST_LOCAL_OFFSET(
dst, dstw);
999 ADJUST_LOCAL_OFFSET(
src, srcw);
1001 op = GET_OPCODE(
op);
1004 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
1040 CHECK(check_sljit_emit_op2(compiler,
op, 0,
dst, dstw, src1, src1w, src2, src2w));
1041 ADJUST_LOCAL_OFFSET(
dst, dstw);
1042 ADJUST_LOCAL_OFFSET(src1, src1w);
1043 ADJUST_LOCAL_OFFSET(src2, src2w);
1045 op = GET_OPCODE(
op);
1057 return emit_op(compiler,
op,
flags |
IMM_OP,
dst, dstw, src1, src1w, src2, src2w);
1062 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
1068 return emit_op(compiler,
op,
flags |
IMM_OP,
dst, dstw, src1, src1w, src2, src2w);
1079 CHECK(check_sljit_emit_op2(compiler,
op, 1, 0, 0, src1, src1w, src2, src2w));
1081 #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
1082 || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
1092 CHECK(check_sljit_emit_op_src(compiler,
op,
src, srcw));
1093 ADJUST_LOCAL_OFFSET(
src, srcw);
1097 if (FAST_IS_REG(
src))
1103 return push_inst(compiler,
NOP, UNMOVABLE_INS);
1117 CHECK_REG_INDEX(check_sljit_get_register_index(reg));
1118 return reg_map[reg];
1123 CHECK_REG_INDEX(check_sljit_get_float_register_index(reg));
1124 return freg_map[reg];
1131 CHECK(check_sljit_emit_op_custom(compiler, instruction,
size));
1133 return push_inst(compiler, *(
sljit_ins*)instruction, UNMOVABLE_INS);
1140 #define FLOAT_DATA(op) ((sljit_ins)DOUBLE_DATA | (((sljit_ins)(op) & SLJIT_32) >> 7))
1141 #define SELECT_FOP(op, single, double) ((op & SLJIT_32) ? single : double)
1142 #define FLOAT_TMP_MEM_OFFSET (22 * sizeof(sljit_sw))
1155 if (FAST_IS_REG(
dst)) {
1171 #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
1180 if (FAST_IS_REG(
src)) {
1218 compiler->cache_arg = 0;
1219 compiler->cache_argw = 0;
1222 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler,
op,
dst, dstw,
src, srcw);
1234 switch (GET_OPCODE(
op)) {
1275 CHECK(check_sljit_emit_fop2(compiler,
op,
dst, dstw, src1, src1w, src2, src2w));
1276 ADJUST_LOCAL_OFFSET(
dst, dstw);
1277 ADJUST_LOCAL_OFFSET(src1, src1w);
1278 ADJUST_LOCAL_OFFSET(src2, src2w);
1280 compiler->cache_arg = 0;
1281 compiler->cache_argw = 0;
1302 if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w,
dst, dstw)) {
1321 switch (GET_OPCODE(
op)) {
1355 CHECK(check_sljit_emit_fast_enter(compiler,
dst, dstw));
1356 ADJUST_LOCAL_OFFSET(
dst, dstw);
1358 if (FAST_IS_REG(
dst))
1363 compiler->delay_slot = UNMOVABLE_INS;
1376 CHECK_PTR(check_sljit_emit_label(compiler));
1383 set_label(
label, compiler);
1384 compiler->delay_slot = UNMOVABLE_INS;
1456 CHECK_PTR(check_sljit_emit_jump(compiler,
type));
1464 jump->
flags |= IS_COND;
1465 if (((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) && !(compiler->delay_slot & ICC_IS_SET))
1466 jump->
flags |= IS_MOVABLE;
1467 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
1468 PTR_FAIL_IF(push_inst(compiler, BICC | get_cc(compiler,
type ^ 1) | 5, UNMOVABLE_INS));
1470 #error "Implementation required"
1474 jump->
flags |= IS_COND;
1475 if (((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) && !(compiler->delay_slot & FCC_IS_SET))
1476 jump->
flags |= IS_MOVABLE;
1477 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
1478 PTR_FAIL_IF(push_inst(compiler, FBFCC | get_cc(compiler,
type ^ 1) | 5, UNMOVABLE_INS));
1480 #error "Implementation required"
1484 if ((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS)
1485 jump->
flags |= IS_MOVABLE;
1487 jump->
flags |= IS_CALL;
1502 CHECK_PTR(check_sljit_emit_call(compiler,
type, arg_types));
1506 #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
1507 || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
1520 CHECK(check_sljit_emit_ijump(compiler,
type,
src, srcw));
1521 ADJUST_LOCAL_OFFSET(
src, srcw);
1523 if (FAST_IS_REG(
src))
1528 set_jump(jump, compiler, JUMP_ADDR);
1531 if ((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS)
1532 jump->
flags |= IS_MOVABLE;
1534 jump->
flags |= IS_CALL;
1547 return push_inst(compiler,
NOP, UNMOVABLE_INS);
1555 CHECK(check_sljit_emit_icall(compiler,
type, arg_types,
src, srcw));
1558 ADJUST_LOCAL_OFFSET(
src, srcw);
1563 FAIL_IF(call_with_args(compiler, arg_types, &
src));
1565 #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
1566 || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
1582 ADJUST_LOCAL_OFFSET(
dst, dstw);
1584 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
1585 op = GET_OPCODE(
op);
1588 compiler->cache_arg = 0;
1589 compiler->cache_argw = 0;
1596 FAIL_IF(push_inst(compiler, BICC | get_cc(compiler,
type) | 3, UNMOVABLE_INS));
1598 FAIL_IF(push_inst(compiler, FBFCC | get_cc(compiler,
type) | 3, UNMOVABLE_INS));
1600 FAIL_IF(push_inst(compiler,
OR |
D(reg) |
S1(0) |
IMM(1), UNMOVABLE_INS));
1601 FAIL_IF(push_inst(compiler,
OR |
D(reg) |
S1(0) |
IMM(0), UNMOVABLE_INS));
1615 #error "Implementation required"
1624 CHECK(check_sljit_emit_cmov(compiler,
type, dst_reg,
src, srcw));
1626 #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
1627 return sljit_emit_cmov_generic(compiler,
type, dst_reg,
src, srcw);;
1629 #error "Implementation required"
1639 CHECK_PTR(check_sljit_emit_const(compiler,
dst, dstw, init_value));
1640 ADJUST_LOCAL_OFFSET(
dst, dstw);
1644 set_const(
const_, compiler);
1647 PTR_FAIL_IF(emit_const(compiler, dst_r, init_value));
1660 CHECK_PTR(check_sljit_emit_put_label(compiler,
dst, dstw));
1661 ADJUST_LOCAL_OFFSET(
dst, dstw);
1665 set_put_label(put_label, compiler, 0);
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
[3]
set set set set set set set macro pixldst1 op
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLsizei GLenum GLenum * types
GLuint GLsizei const GLchar * label
[43]
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLuint GLuint GLuint arg1
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
#define SLJIT_UNREACHABLE()
unsigned short int sljit_u16
signed short int sljit_s16
#define SLJIT_UNLIKELY(x)
#define SLJIT_LOCALS_OFFSET
#define SLJIT_API_FUNC_ATTRIBUTE
#define SLJIT_COMPILE_ASSERT(x, description)
#define SLJIT_NUMBER_OF_FLOAT_REGISTERS
#define SLJIT_NUMBER_OF_REGISTERS
unsigned long int sljit_uw
#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_SKIP_FRAMES_BEFORE_FAST_RETURN
#define SLJIT_ARG_TYPE_SCRATCH_REG
#define SLJIT_LESS_EQUAL_F64
#define SLJIT_CONV_F64_FROM_S32
#define SLJIT_FAST_RETURN
#define SLJIT_NOT_EQUAL_F64
#define SLJIT_HAS_ZERO_REGISTER
#define SLJIT_GREATER_EQUAL_F64
#define SLJIT_UNORDERED_F64
#define SLJIT_GREATER_F64
#define SLJIT_ARG_TYPE_F32
#define SLJIT_PREFETCH_L3
#define SLJIT_SIG_GREATER_EQUAL
#define SLJIT_ARG_TYPE_F64
#define SLJIT_PREFETCH_L1
#define SLJIT_SIG_LESS_EQUAL
#define SLJIT_ORDERED_F64
#define SLJIT_REWRITABLE_JUMP
#define SLJIT_NOT_OVERFLOW
#define SLJIT_CURRENT_FLAGS_ADD
#define SLJIT_SIG_GREATER
#define SLJIT_GREATER_EQUAL
#define SLJIT_SKIP_FRAMES_BEFORE_RETURN
#define SLJIT_ERR_COMPILED
#define SLJIT_CONV_F64_FROM_F32
#define SLJIT_PREFETCH_L2
#define SLJIT_CURRENT_FLAGS_SUB
#define SLJIT_PREFETCH_ONCE
#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)
#define FLOAT_TMP_MEM_OFFSET
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 dst_reg, sljit_s32 src, sljit_sw srcw)
SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump * sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type)
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)
SLJIT_API_FUNC_ATTRIBUTE struct sljit_label * sljit_emit_label(struct sljit_compiler *compiler)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
#define SELECT_FOP(op, single, double)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler)
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_op0(struct sljit_compiler *compiler, sljit_s32 op)
SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label * sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
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)
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)
SLJIT_API_FUNC_ATTRIBUTE void * sljit_generate_code(struct sljit_compiler *compiler)
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 const char * sljit_get_platform_name(void)
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 struct sljit_jump * sljit_emit_call(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 arg_types)
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
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)
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_get_register_index(sljit_s32 reg)
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)
struct sljit_const * consts
void * exec_allocator_data
sljit_sw executable_offset
struct sljit_jump * jumps
struct sljit_label * last_label
struct sljit_memory_fragment * buf
struct sljit_put_label * put_labels
struct sljit_label * labels
struct sljit_label * label
struct sljit_label * label
struct sljit_put_label * next
const T & const_(const T &t)