mirror of
https://github.com/ish-app/ish.git
synced 2026-02-01 14:32:26 +00:00
Implement sahf
This commit is contained in:
parent
9d7bf7025a
commit
a02fe95b33
@ -75,14 +75,11 @@
|
||||
.else; .ifc \cond,cz
|
||||
check_cf
|
||||
jnz \target
|
||||
check_res
|
||||
jz \target
|
||||
res_or_flag z, ZF_RES, ZF_FLAG, \target
|
||||
.else; .ifc \cond,s
|
||||
check_res
|
||||
js \target
|
||||
res_or_flag s, SF_RES, SF_FLAG, \target
|
||||
.else; .ifc \cond,p
|
||||
check_res
|
||||
jp \target
|
||||
res_or_flag p, PF_RES, PF_FLAG, \target
|
||||
.else; .ifc \cond,sxo
|
||||
check_res
|
||||
sets %r14b
|
||||
@ -165,3 +162,13 @@
|
||||
call helper_expand_flags
|
||||
restore_c
|
||||
gret
|
||||
|
||||
.gadget sahf
|
||||
xchgb %ah, %al
|
||||
movb %al, CPU_eflags(%_cpu)
|
||||
xchgb %al, %ah
|
||||
save_c
|
||||
movq %_cpu, %rdi
|
||||
call helper_expand_flags
|
||||
restore_c
|
||||
gret
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user