This is the mail archive of the 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]
Other format: [Raw text]

Re: Support for targets with widths other than 2^x (Power of 2)

On Thu, Oct 15, 2015 at 02:34:06PM +0200, Ramon Wirsch wrote:
> The SpartanMC architecture poses a few additional difficulties as it
> is 18 Bits wide.
> Our investigations have shown that GCC is on principle capable of that
> (it is working right now, although with several limitations). The main
> problems are posed by code optimizations that are only applicable for
> 2^x values such as
> ... & (obj_align - 1);
>  or
> d_int.lshift (BITS_PER_UNIT_LOG)
> Until now, every bug or crash we experienced was caused by such
> implementations that can very well be rewritten to have correct
> results no matter the actual value.

Patches welcome :-)

> Also, the current codebase does not seem to be unified in this and
> already mixes general implementations and ones that only work for
> powers of 2.
> Our question now is, whether or not compatibility with our 18 bit
> architecture and others is something you desire GCC to be capable of
> in the long term.

If it is not a big maintenance burden (and you say it isn't), I don't
see why we wouldn't want to support this.

The flip side is that there also needs to be constant maintenance from
"your" side (i.e., people testing with interesting word lengths), to
prevent things from regressing -- many people will just not consider
the possibility of non-power-of-two word lengths.

Do you already have patches for this separated out?  If you post those
people can more clearly see what the actual impact is.


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