FDOS/share

Flags setting before iret return or jmp far chain is pointless

Closed this issue · 2 comments

share/gcc_help.asm

Lines 97 to 98 in ee31a10

push word [iregs.flags]
popf

Doing this before iret is always pointless. Doing it before jmp far chaining (or retf chaining) is not really useful either. Besides, the C code doesn't seem to ever read or write this variable. May I add a pull request to drop the variable's setting and loading in the helper file?

(We probably should use cld before entering the C handler though. But there is not much reason to preserve a Down state (Direction Flag = 1) for the next handler in case we chain afterwards.)

Sure, whatever you think best. I have limited asm experience so it's interesting to see the changes you'll make.
Thanks.