Reputation: 107
A basic question but I have trouble finding an answer. In assembly, disregarding which one, are the flags used to perform JE, JNE, JL, JG, JLE, JGE
usually all cleared after the jump is done ?
Upvotes: 3
Views: 889
Reputation: 93034
Conditional jump instructions do not set flags. So you can for example jump multiple times on the same comparison:
cmp eax, ecx
jl foo ; if eax < ecx jump to foo
jg bar ; if eax > ecx jump to bar
jmp baz ; otherwise jump to baz
Upvotes: 5