⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 icode.c

📁 linux下建立JAVA虚拟机的源码KAFFE
💻 C
📖 第 1 页 / 共 5 页
字号:
voidxor_int_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_xor_int_const)	if (HAVE_xor_int_const_rangecheck(val)) {		slot_slot_const(dst, src, val, HAVE_xor_int_const, Tcomplex);	}	else#endif	{		SlotInfo* tmp;		slot_alloctmp(tmp);		move_int_const(tmp, val);		_xor_int(dst, src, tmp);		slot_freetmp(tmp);	}}voidxor_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_xor_int_const)	if (slot_type(src) == Tconst) {		xor_int_const(dst, src2, slot_value(src)->i);	}	else if (slot_type(src2) == Tconst) {		xor_int_const(dst, src, slot_value(src2)->i);	}	else#endif	_xor_int(dst, src, src2);}#endifvoidxor_long(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_xor_long)	lslot_lslot_lslot(dst, src, src2, HAVE_xor_long, Tcomplex);#else	xor_int(LSLOT(dst), LSLOT(src), LSLOT(src2));	xor_int(HSLOT(dst), HSLOT(src), HSLOT(src2));#endif}#if defined(HAVE_lshl_int)void_lshl_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){	slot_slot_slot(dst, src, src2, HAVE_lshl_int, Tcomplex);}voidlshl_int_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_lshl_int_const)	if (HAVE_lshl_int_const_rangecheck(val)) {		slot_slot_const(dst, src, val, HAVE_lshl_int_const, Tcomplex);	}	else#endif	{		SlotInfo* tmp;		slot_alloctmp(tmp);		move_int_const(tmp, val);		_lshl_int(dst, src, tmp);		slot_freetmp(tmp);	}}voidlshl_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_lshl_int_const)	if (slot_type(src2) == Tconst) {		lshl_int_const(dst, src, slot_value(src2)->i);	}	else#endif	_lshl_int(dst, src, src2);}#endif#if defined(HAVE_lshl_long_const)voidlshl_long_const(SlotInfo* dst, SlotInfo* src, jint val){	if (HAVE_lshl_long_const_rangecheck(val)) {		slot_slot_const(dst, src, val, HAVE_lshl_long_const, Tcomplex);	}	else	{		SlotInfo* tmp;		slot_alloctmp(tmp);		move_int_const(tmp, val);		lshl_int(dst, src, tmp);		slot_freetmp(tmp);	}}#endifvoidlshl_long(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_lshl_long)	lslot_lslot_slot(dst, src, src2, HAVE_lshl_long, Tcomplex);#else	begin_func_sync();#if defined(PUSHARG_FORWARDS)	pusharg_long(src, 0);	pusharg_int(src2, pusharg_long_idx_inc);#else	pusharg_int(src2, pusharg_long_idx_inc);	pusharg_long(src, 0);#endif	call_soft(soft_lshll);	popargs();	end_func_sync();	return_long(dst);#endif}#if defined(HAVE_ashr_int)void_ashr_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){	slot_slot_slot(dst, src, src2, HAVE_ashr_int, Tcomplex);}voidashr_int_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_ashr_int_const)	if (HAVE_ashr_int_const_rangecheck(val)) {		slot_slot_const(dst, src, val, HAVE_ashr_int_const, Tcomplex);	}	else#endif	{		SlotInfo* tmp;		slot_alloctmp(tmp);		move_int_const(tmp, val);		_ashr_int(dst, src, tmp);		slot_freetmp(tmp);	}}voidashr_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_ashr_int_const)	if (slot_type(src2) == Tconst) {		ashr_int_const(dst, src, slot_value(src2)->i);	}	else#endif	_ashr_int(dst, src, src2);}#endifvoidashr_long(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_ashr_long)	lslot_lslot_slot(dst, src, src2, HAVE_ashr_long, Tcomplex);#else	begin_func_sync();#if defined(PUSHARG_FORWARDS)	pusharg_long(src, 0);	pusharg_int(src2, pusharg_long_idx_inc);#else	pusharg_int(src2, pusharg_long_idx_inc);	pusharg_long(src, 0);#endif	call_soft(soft_ashrl);	popargs();	end_func_sync();	return_long(dst);#endif}#if defined(HAVE_lshr_int)void_lshr_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){	slot_slot_slot(dst, src, src2, HAVE_lshr_int, Tcomplex);}voidlshr_int_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_lshr_int_const)	if (HAVE_lshr_int_const_rangecheck(val)) {		slot_slot_const(dst, src, val, HAVE_lshr_int_const, Tcomplex);	}	else#endif	{		SlotInfo* tmp;		slot_alloctmp(tmp);		move_int_const(tmp, val);		_lshr_int(dst, src, tmp);		slot_freetmp(tmp);	}}voidlshr_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_lshr_int_const)	if (slot_type(src2) == Tconst) {		lshr_int_const(dst, src, slot_value(src2)->i);	}	else#endif	_lshr_int(dst, src, src2);}#endifvoidlshr_long(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_lshr_long)	lslot_lslot_slot(dst, src, src2, HAVE_lshr_long, Tcomplex);#else	begin_func_sync();#if defined(PUSHARG_FORWARDS)	pusharg_long(src, 0);	pusharg_int(src2, pusharg_long_idx_inc);#else	pusharg_int(src2, pusharg_long_idx_inc);	pusharg_long(src, 0);#endif	call_soft(soft_lshrl);	popargs();	end_func_sync();	return_long(dst);#endif}/* ----------------------------------------------------------------------- *//* Load and store.							   *//*									   */#if defined(HAVE_load_int)voidload_int(SlotInfo* dst, SlotInfo* src){	slot_slot_slot(dst, NULL, src, HAVE_load_int, Tload);}#endifvoidload_offset_int(SlotInfo* dst, SlotInfo* src, jint offset){	if (offset == 0) {		load_int(dst, src);	}	else#if defined(HAVE_load_offset_int)	if (HAVE_load_offset_int_rangecheck(offset)) {		slot_slot_const(dst, src, offset, HAVE_load_offset_int, Tload);	}	else#endif	{		SlotInfo* tmp;		slot_alloctmp(tmp);		add_ref_const(tmp, src, offset);		load_int(dst, tmp);		slot_freetmp(tmp);	}}voidload_addr_int(SlotInfo* dst, void* addr){#if defined(HAVE_load_addr_int)	slot_slot_const(dst, NULL, (uintp)addr, HAVE_load_addr_int, Tload);#else	SlotInfo* tmp;	slot_alloctmp(tmp);	move_ref_const(tmp, addr);	load_int(dst, tmp);	slot_freetmp(tmp);#endif}#if defined(HAVE_load_ref)voidload_ref(SlotInfo* dst, SlotInfo* src){	slot_slot_slot(dst, NULL, src, HAVE_load_ref, Tload);}#endifvoidload_offset_ref(SlotInfo* dst, SlotInfo* src, jint offset){	if (offset == 0) {		load_ref(dst, src);	}	else#if defined(HAVE_load_offset_ref)	if (HAVE_load_offset_ref_rangecheck(offset)) {		slot_slot_const(dst, src, offset, HAVE_load_offset_ref, Tload);	}	else#endif	{		SlotInfo* tmp;		slot_alloctmp(tmp);		add_ref_const(tmp, src, offset);		load_ref(dst, tmp);		slot_freetmp(tmp);	}}voidload_addr_ref(SlotInfo* dst, void* addr){#if defined(HAVE_load_addr_ref)	slot_slot_const(dst, NULL, (uintp)addr, HAVE_load_addr_ref, Tload);#else	SlotInfo* tmp;	slot_alloctmp(tmp);	move_ref_const(tmp, addr);	load_ref(dst, tmp);	slot_freetmp(tmp);#endif}voidload_long(SlotInfo* dst, SlotInfo* src){#if defined(HAVE_load_long)	lslot_lslot_lslot(dst, 0, src, HAVE_load_long, Tload);#else	SlotInfo* tmp;	slot_alloctmp(tmp);	add_ref_const(tmp, src, 4);	/* Don't use LSLOT & HSLOT here */	load_int(dst, src);	load_int(dst+1, tmp);	slot_freetmp(tmp);#endif}voidload_addr_long(SlotInfo* dst, void* addr){#if defined(HAVE_load_addr_long)	slot_slot_const(dst, 0, (uintp)addr, HAVE_load_addr_long, Tload);#else	load_addr_int(dst, addr);	load_addr_int(dst+1, (void*)((uintp)addr+4));#endif}voidload_float(SlotInfo* dst, SlotInfo* src){#if defined(HAVE_load_float)	slot_slot_slot(dst, NULL, src, HAVE_load_float, Tload);#elif defined(HAVE_NO_FLOATING_POINT)	load_int(dst, src);#else	KAFFEVM_ABORT();#endif}voidload_addr_float(SlotInfo* dst, void* addr){#if defined(HAVE_load_addr_float)	slot_slot_const(dst, NULL, (uintp)addr, HAVE_load_addr_float, Tload);#else	SlotInfo* tmp;	slot_alloctmp(tmp);	move_ref_const(tmp, addr);	load_float(dst, tmp);	slot_freetmp(tmp);#endif}voidload_double(SlotInfo* dst, SlotInfo* src){#if defined(HAVE_load_double)	lslot_lslot_slot(dst, NULL, src, HAVE_load_double, Tload);#elif defined(HAVE_NO_FLOATING_POINT) || defined(PS2LINUX)	load_long(dst, src);#else	KAFFEVM_ABORT();#endif}voidload_addr_double(SlotInfo* dst, void* addr){#if defined(HAVE_load_addr_double)	lslot_lslot_const(dst, 0, (uintp)addr, HAVE_load_addr_double, Tload);#else	SlotInfo* tmp;	slot_alloctmp(tmp);	move_ref_const(tmp, addr);	load_double(dst, tmp);	slot_freetmp(tmp);#endif}voidload_byte(SlotInfo* dst, SlotInfo* src){#if defined(HAVE_load_byte)	slot_slot_slot(dst, NULL, src, HAVE_load_byte, Tload);#else	load_int(dst, src);	lshl_int_const(dst, dst, 8 * (sizeof(jint) - sizeof(jbyte)));	ashr_int_const(dst, dst, 8 * (sizeof(jint) - sizeof(jbyte)));#endif}voidload_char(SlotInfo* dst, SlotInfo* src){#if defined(HAVE_load_char)	slot_slot_slot(dst, NULL, src, HAVE_load_char, Tload);#else	load_int(dst, src);	and_int_const(dst, dst, (1 << (8 * sizeof(jchar))) - 1);#endif}voidload_short(SlotInfo* dst, SlotInfo* src){#if defined(HAVE_load_short)	slot_slot_slot(dst, NULL, src, HAVE_load_short, Tload);#else	load_int(dst, src);	lshl_int_const(dst, dst, 8 * (sizeof(jint) - sizeof(jshort)));	ashr_int_const(dst, dst, 8 * (sizeof(jint) - sizeof(jshort)));#endif}voidload_addr_char(SlotInfo* dst, void* addr){#if defined(HAVE_load_addr_char)	slot_slot_const(dst, 0, (uintp)addr, HAVE_load_addr_char, Tload);#else	SlotInfo* tmp;	slot_alloctmp(tmp);	move_ref_const(tmp, addr);	load_char(dst, tmp);	slot_freetmp(tmp);#endif}voidload_addr_byte(SlotInfo* dst, void* addr){#if defined(HAVE_load_addr_byte)	slot_slot_const(dst, 0, (uintp)addr, HAVE_load_addr_byte, Tload);#else	SlotInfo* tmp;	slot_alloctmp(tmp);	move_ref_const(tmp, addr);	load_byte(dst, tmp);	slot_freetmp(tmp);#endif}voidload_addr_short(SlotInfo* dst, void* addr){#if defined(HAVE_load_addr_short)	slot_slot_const(dst, 0, (uintp)addr, HAVE_load_addr_short, Tload);#else	SlotInfo* tmp;	slot_alloctmp(tmp);	move_ref_const(tmp, addr);	load_short(dst, tmp);	slot_freetmp(tmp);#endif}voidload_offset_long(SlotInfo* dst, SlotInfo* src, jint offset){	if (offset == 0) {		load_long(dst, src);	}	else#if defined(HAVE_load_offset_long)	if (HAVE_load_offset_long_rangecheck(offset)) {		lslot_slot_const(dst, src, offset, HAVE_load_offset_long, Tload);	}	else#endif	{                /* Don't use LSLOT & HSLOT here */		load_offset_int(dst, src, offset);		load_offset_int(dst+1, src, offset+4);	}}voidload_offset_byte(SlotInfo* dst, SlotInfo* src, jint offset){	if (offset == 0) {		load_byte(dst, src);	}	else#if defined(HAVE_load_offset_byte)	if (HAVE_load_offset_byte_rangecheck(offset)) {		slot_slot_const(dst, src, offset, HAVE_load_offset_byte, Tload);	}	else#endif	{		SlotInfo* tmp;		slot_alloctmp(tmp);		add_ref_const(tmp, src, offset);		load_byte(dst, tmp);		slot_freetmp(tmp);	}}voidload_offset_char(SlotInfo* dst, SlotInfo* src, jint offset){	if (offset == 0) {		load_char(dst, src);	}	else#if defined(HAVE_load_offset_char)	if (HAVE_load_offset_char_rangecheck(offset)) {		slot_slot_const(dst, src, offset, HAVE_load_offset_char, Tload);	}	else#endif	{		SlotInfo* tmp;		slot_alloctmp(tmp);		add_ref_const(tmp, src, offset);		load_char(dst, tmp);		slot_freetmp(tmp);	}}voidload_offset_short(SlotInfo* dst, SlotInfo* src, jint offset){	if (offset == 0) {		load_short(dst, src);	}	else#if defined(HAVE_load_offset_short)	if (HAVE_load_offset_short_rangecheck(offset)) {		slot_slot_const(dst, src, offset, HAVE_load_offset_short, Tload);	}	else#endif	{		SlotInfo* tmp;		slot_alloctmp(tmp);		add_ref_const(tmp, src, offset);		load_short(dst, tmp);		slot_freetmp(tmp);	}}voidload_offset_float(SlotInfo* dst, SlotInfo* src, jint offset){	if (offset == 0) {		load_float(dst, src);	}	else#if defined(HAVE_load_offset_float)	if (HAVE_load_offset_float_rangecheck(offset)) {		slot_slot_const(dst, src, offset, HAVE_load_offset_float, Tload);	}	else#endif	{		SlotInfo* tmp;		slot_alloctmp(tmp);		add_ref_const(tmp, src, offset);		load_float(dst, tmp);		slot_freetmp(tmp);	}}voidload_offset_double(SlotInfo* dst, SlotInfo* src, jint offset){	if (offset == 0) {		load_double(dst, src);	}	else#if defined(HAVE_load_offset_double)	if (HAVE_load_offset_double_rangecheck(offset)) {		lslot_slot_const(dst, src, offset, HAVE_load_offset_double, Tload);	}	else#endif	{		SlotInfo* tmp;		slot_alloctmp(tmp);		add_ref_const(tmp, src, offset);		load_double(dst, tmp);		slot_freetmp(tmp);	}}voidload_offset_scaled_int(SlotInfo* dst, SlotInfo* src, SlotInfo* idx, int offset){	if (slot_type(idx) == Tconst) {		load_offset_int(dst, src, (jint)(slot_value(idx)->i * sizeof(jint) + offset));	}	else#if defined(HAVE_load_offset_scaled_int)	slot_slot_slot_const_const(dst, src, idx, offset, 0, HAVE_load_offset_scaled_int, Tload);#else	{		SlotInfo* tmp;		slot_alloctmp(tmp);		lshl_int_const(tmp, idx, SHIFT_jint);		add_ref(tmp, src, tmp);		load_offset_int(dst, tmp, offset);		slot_freetmp(tmp);	}#endif}voidload_offset_scaled_ref(SlotInfo* dst, SlotInfo* src, SlotInfo* idx, int offset){	if (slot_type(idx) == Tconst) {		load_offset_ref(dst, src, (jint)(slot_value(idx)->i * sizeof(jref) + offset));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -