This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

h8300: less optimal (buggy?) compiler output with last build


After installing the latest build of the h8 toolchain,
I realized that the compiler output (assembler source)
is worse than before (I used to use a snapshot from
December 99). One concrete example (cc the use of inline
functions):

extern unsigned char volatile TCW;

inline Watchdog()
{
  TCW = 0;
}

void testcase_1(void)
{
  TCW = 0;
}

void testcase_2(void)
{
  Watchdog();
}

The h8 assembler source (compiled with -Os -fomit-frame-pointer):

testcase_1: sub   r2l, r2l
            mov.b r2l, TCW
            rts

testcase_2: sub   r2l, r2l
            mov.b r2l, TCW
            mov.b TCW, r2l  ; <-- ????
            rts

As you can see, in the "inline" test case there is an erroneous read
of the previously written address.
This could be fatal (in case of an embedded system), when the
hardware doesn't "like" read access to a write-only position. So there
is good reason to treat this as a BUG.

As I mentioned before, this problem didn't occure in earlier versions
(e.g. Dec-99).

Is this issue present in other ports?
Will this be investigated by somebody?
Or, could anybody give hints where to look for this issue in the sources?

Regards,
Ralf

           .....
           ô ô )
-----oOOo--(_)---oOOo------

Ralf Guetlein
Biotest Medizintechnik GmbH
Industriestrasse 19
D-63755 Alzenau
Germany
---------------------------
Tel. +49 6023 9487-42
Fax. +49 6023 9487-33
ralf.guetlein@biotest-mt.de
---------------------------



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]