0

In 64 bit processor, we got 16 registers. Some of them are reserved for special purpose, like %rsp.

For Flag register, is it one of the 16 registers?

If yes, how can we know which register it is using, say $rax? If we don't know which it is, do we have chance accidentally overwrite it (assume we write assembly code directly)?

If no, so there are actually more registers than the 16 registers?

Peter Cordes
  • 286,368
  • 41
  • 520
  • 731
HKIT
  • 482
  • 6
  • 15
  • 2
    It's RFLAGS (https://en.wikipedia.org/wiki/FLAGS_register), and yes, the 16 general-purpose integer regs are not the only registers in x86-64. There's also RFLAGS, xmm0..15 and MXCSR, the control registers, the x87 status registers, the debug registers, etc. – Peter Cordes Jan 31 '22 at 04:04

0 Answers0