Gcc only tests certain conditions and requires zero, carry and overflow
sign flags to be set usefully (ie indicating result). The real AVR flag
status is translated to a similar internal flag set within gcc.
It does not use H flag or T flag. But certain sequences emitted by
backend to synthesize gcc instruction might use any flag internally.
Each instruction template written defines what happens to CC_status -
for example, "clobber" means instruction sequence leaves no useful
information and "none" means sequence has no effect on flags. Gcc tracks
this to see if explicit tests on results can be omitted.
You may note that gcc cant deal with sign flag only. So many instruction
sequence results cant be tested for plus/minus - which causes otherwise
redundant tests to be left in.
Andy
Ruud Vlaming wrote:
On Sunday 21 September 2008 22:22, you wrote:
T-bit is used by avr-gcc for internal purpose, the same way as temp reg (r0)
and cannot be used for storing value.
I see. I looked at it and i cannot get clear in which circumstances,
this is, but it does not really matter i suppose. Point is, you cannot destroy
the value of the Tbit at your liking, although i never saw the Tbit being used
in my code by gcc.
And how about the H flag? The Half carry is produced by a lot of instructions,
but i never saw the compiler test for it,or make use of it. I looked the avr
directory over for H flag tests or direct H flag manipulating functions
(seh, clh, brhc, brhs) and found none.
You would really help me if you know more on this.
Ruud.
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list