src/See/jitter.c
//
// emit routine to output the actual binary code
//

emit routine to output the actual binary code
emit routine to output the actual binary code
void emit_code(binary_stream *stream, ULONG value, UINT len)
{
	switch (len){
	case 1:
		stream->ibuf[stream->cur_ip]=(UCHAR)value;
		stream->cur_ip++;
		break;
	case 2:
		*((USHORT*)(stream->ibuf+stream->cur_ip))=(USHORT)value;
		stream->cur_ip+=2;
		break;
	case 4:
		*((ULONG*)(stream->ibuf+stream->cur_ip))=value;
		stream->cur_ip+=4;
		break;
	default:;
	}
	return;
}
void emit_code ( binary_stream * stream , ULONG value , UINT len ) { switch ( len ) { case 1 : stream -> ibuf [ stream -> cur_ip ] = ( UCHAR ) value ; stream -> cur_ip ++ ; break ; case 2 : * ( ( USHORT * ) ( stream -> ibuf + stream -> cur_ip ) ) = ( USHORT ) value ; stream -> cur_ip += 2 ; break ; case 4 : * ( ( ULONG * ) ( stream -> ibuf + stream -> cur_ip ) ) = value ; stream -> cur_ip += 4 ; break ; default : ; } return ; }
emit routine to output the actual binary code
emit routine to output the actual binary code