No!
The cmp %eax,%ebx
instuction is like sub %eax,%ebx
instruction, but with cmp
instruction the registers after execution remain unchanged, except the flag register.
The test %eax,%ebx
instuction is like and %eax,%ebx
instruction, but with test
instruction the registers after execution remain unchanged, except the flag register.
The affected flags are Carry = 0, Zero = x, Overflow=0 and Sign = x
The jg
instructon should execute jump if zero flag = 0 and sign flag = overflow
So in case...
test %eax, %ebx
jg some_random_place
...the jump should be executed if the result of and %eax,%ebx
is positive and not 0.