Is there a difference between undefined and unaffected behavior for flags?

StackOverflow https://stackoverflow.com/questions/23258684

  •  08-07-2023
  •  | 
  •  

سؤال

Some sources I looked at listed some flags behavior as undefined for some instructions, while different sources list unaffected. I know that undefined behavior of flags shouldn't be looked at, but what about unaffected behavior? Are they the same things?

هل كانت مفيدة؟

المحلول

No, they are not the same thing.

Unaffected means exactly what it says. It will not change the value of the flags register.

Undefined behavior means that the architecture can do whatever it wants with the flags register.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top