FreeBSD/sys/contrib/x86emu/x86emu.c
/*
 * REMARKS:
 * Implements the MUL instruction and side effects.
 */
Implements the MUL instruction and side effects.
Implements the MUL instruction and side effects .
static void 
mul_long(struct x86emu *emu, uint32_t s)
{
	uint64_t res = (uint64_t) emu->x86.R_EAX * s;
	emu->x86.R_EAX = (uint32_t) res;
	emu->x86.R_EDX = (uint32_t) (res >> 32);
	if (emu->x86.R_EDX == 0) {
		CLEAR_FLAG(F_CF);
		CLEAR_FLAG(F_OF);
	} else {
		SET_FLAG(F_CF);
		SET_FLAG(F_OF);
	}
}
static void mul_long ( struct x86emu * emu , uint32_t s ) { uint64_t res = ( uint64_t ) emu -> x86 . R_EAX * s ; emu -> x86 . R_EAX = ( uint32_t ) res ; emu -> x86 . R_EDX = ( uint32_t ) ( res >> 32 ) ; if ( emu -> x86 . R_EDX == 0 ) { CLEAR_FLAG ( F_CF ) ; CLEAR_FLAG ( F_OF ) ; } else { SET_FLAG ( F_CF ) ; SET_FLAG ( F_OF ) ; } }
REMARKS:
 Implements the MUL instruction and side effects.
REMARKS : Implements the MUL instruction and side effects .