[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Flags affected by add[aq]



Several people have stated that the 'adda' and 'addq an' instructions
affect the condition codes of the 680x0. I'd like to state that this is
_not_ the case. All of the documentation I have on the 680x0 states this
fact, and several tests performed on my 68000 reaffirm this.

For example, using DevPac I wrote a sequence of instructions to test
the theory that these instructions affect the condition codes. On stepping
through them, *the condition codes did not change*!!!

Indeed, looking at the output of Gcc, if these instructions did affect
the condition codes, MiNT would not work *at all*.

I also checked the differences between the code generated with normal
-O2 optimisations, and that generated with -fno-defer-pop. There were
no significant differences in proc.c. The assembly code matched the
source code in both cases.

How are we sure that the problem is in proc.c? It's perfectly possible
that the actual bug is elsewhere, but causes a fault only when a
function in proc.c is executed...

Cheers, Steve