mirror of
https://github.com/ish-app/ish.git
synced 2026-02-01 14:32:26 +00:00
Implement jcxz
This commit is contained in:
parent
65d65a813a
commit
25931324fe
@ -31,6 +31,14 @@
|
||||
.gadget jmp
|
||||
movl (%_ip), %_eip
|
||||
jmp jit_ret
|
||||
.gadget jcxz
|
||||
cmpl $0, %ecx
|
||||
jne 1f
|
||||
movl (%_ip), %_eip
|
||||
jmp jit_ret
|
||||
1:
|
||||
movl 8(%_ip), %_eip
|
||||
jmp jit_ret
|
||||
|
||||
#define COND_LIST o,c,z,cz,s,p,sxo,sxoz
|
||||
#define IMPLEMENTED_CONDS c,z,cz,s,p,sxo,sxoz
|
||||
|
||||
@ -156,7 +156,7 @@ static inline void gen_op(struct gen_state *state, gadget_t *gadgets, enum arg a
|
||||
|
||||
#define JMP(loc) load(loc, OP_SIZE); g(jmp_indir)
|
||||
#define JMP_REL(off) gg(jmp, state->ip + off)
|
||||
#define JCXZ_REL(off) UNDEFINED
|
||||
#define JCXZ_REL(off) ggg(jcxz, state->ip + off, state->ip)
|
||||
#define J_REL(cc, off) gagg(jmp, cond_##cc, state->ip + off, state->ip)
|
||||
#define JN_REL(cc, off) gagg(jmp, cond_##cc, state->ip, state->ip + off)
|
||||
#define CALL(loc) load(loc, OP_SIZE); ggg(call_indir, saved_ip, state->ip)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user