예제 #1
0
파일: emit_32.c 프로젝트: kele86838437/jato
static void emit_imm(struct buffer *buf, long imm)
{
	if (is_imm_8(imm))
		emit(buf, imm);
	else
		emit_imm32(buf, imm);
}
예제 #2
0
파일: emit_32.c 프로젝트: kele86838437/jato
static void __emit_call(struct buffer *buf, void *call_target)
{
	int disp = x86_call_disp(buffer_current(buf), call_target);

	emit(buf, 0xe8);
	emit_imm32(buf, disp);
}
예제 #3
0
파일: emit_64.c 프로젝트: jiangecho/jato
static void __emit_call(struct buffer *buf, void *call_target)
{
	int disp = call_target - buffer_current(buf) - X86_CALL_INSN_SIZE;

	emit(buf, 0xe8);
	emit_imm32(buf, disp);
}
예제 #4
0
파일: emit_32.c 프로젝트: kele86838437/jato
static void emit_branch_rel(struct buffer *buf, unsigned char prefix,
			    unsigned char opc, long rel32)
{
	if (prefix)
		emit(buf, prefix);
	emit(buf, opc);
	emit_imm32(buf, rel32);
}