[llvm-dev] RFC: On non 8-bit bytes and the target for it

JF Bastien via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 30 06:35:28 PDT 2019



> On Oct 30, 2019, at 3:07 AM, Jeroen Dobbelaere <Jeroen.Dobbelaere at synopsys.com> wrote:
> 
> 
>> 
>> From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of JF Bastien via
> [..]
>> Is it relevant to any modern compiler though?
>> 
>> I strongly agree with Tim. As I said in previous threads, unless people will have
>> actual testable targets for this type of thing, I think we shouldn’t add
>> maintenance burden. This isn’t really C or C++ anymore because so much code
>> assumes CHAR_BIT == 8, or at a minimum CHAR_BIT % 8 == 0, that we’re
>> supporting a different language. IMO they should use a different language, and
>> C / C++ should only allow CHAR_BIT % 8 == 0 (and only for small values of
>> CHAR_BIT).
> 
> We (Synopsys ASIP Designer team) and our customers tend to disagree: our customers do create plenty of cpu architectures
> with non-8-bit characters (and non-8-bit addressable memories). We are able to provide them with a working c/c++ compiler solution.
> Maybe some support libraries are not supported out of the box, but for these kind of architectures that is acceptable. 

That’s the kind of use case I’d happily support if we had upstream testing, say though a backend. I’m also happy if we remove magic numbers. 

Can you share the values you see for CHAR_BIT?



> (Besides that, llvm is also more than just c/c++)

Agreed, I bring up C and C++ because they were the languages discussed in the previous proposals. 

> Greetings,
> 
> Jeroen Dobbelaere
> 
> 


More information about the llvm-dev mailing list