stdarch
stdarch copied to clipboard
Change Status flags in EFLAGS(ZF)
Is it possible to change ZF flag using asm!?
For intrinsics _mm512_kortestc:
Description Performs bitwise OR between k1 and k2, storing the result in dst. CF flag is set if dst consists of all 1's.
Operation dst[15:0] := k1[15:0] | k2[15:0] IF PopCount(dst[15:0]) == 16 SetCF() FI
Is this doable in the nightly version?
You may change it within the asm block if you haven't used the preserves_flags option. There is no guarantee that it will remain set after the asm block ends AFAIK. You should put the kortestc and the instruction using the flag in the same asm block to prevent any instruction clobbering it to get in between.
Could you give me some hints how to modify EFLAGS? EFlags register: Bit #6 - zero flag It's like %eflags[5]?
You can read the value of the zero flag by using the setz
or setnz
instructions.