https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83133
--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- Both 32-bit and 64-bit ABIs make the values of flags in EFLAGS (other than DF) undefined on function entry and return. Thus, a function can never assume anything about the value of OF unless it has executed an instruction known to set/clear it and has not called any other functions since then.