Thanks, Phil. This will be done a bit later with a proper fix which counts bit more things around shift. I started a thread in gcc list where possible fix will be discussed. ~d
On Sunday 18 July 2004 04:26, Philip Sambles wrote: > Hi, > > Here is the patch, it is for gcc-3.4.1 but it does work with gcc-3.4.0. I > have tested it under the Cygwin environment and it appears to produce valid > output. The peephole optimisation to replace the mov/and with a bit > operation isn't working even though (at a quick look) it seems to match the > generated RTL. > > If you're planning on using this for anything important I would recommend > that you test it more thoroughly. > > To stop the compiler doing the conversion to shifts you need to add > '-fno-fold-single-bit' to the compiler command line. > > Regards > > Phil.