Hi,

For C code,

unsigned long sss(unsigned long a)
{
        return a >> 9;
}

The generated stm8 code will make the result of (0x55555555 >> 9) to be 0x002a2aaa, which should be 0x002aaaaa.

A patch is comitted, please refer to https://sourceforge.net/p/sdcc/patches/235/  for details.

Ben