I'm trying to understand booting in xv6 (a teaching OS) with gdb.
One of the instructions during the initial boot is (AT&T syntax):
cmpl 0x0,%cs:0x65a4
And then,
jne 0xfd2b9
Now, from what I understand, cmpl compares the two values and sets flags, jne looks at the flags and jumps if the values just compared were not equal.
But I don't understand the meaning of %cs:0x65a4 as the operand. Is this referring to the value of the address (cs*16 + 65a4), or the actual contents of that memory location?
I'm asking because the system doesn't end up jumping after the jne instruction, which means the second operand (%cs:0x65a4) evaluated to zero. But that shouldn't be, since neither the address nor its contents is zero.