[LLVMdev] [llvm-commits] [cfe-commits] [PATCH] [llvm+clang] memset for non-8-bit bytes

Patrik Hägglund H patrik.h.hagglund at ericsson.com
Fri Oct 19 22:20:13 PDT 2012


> That definition isn't really relevant to LLVM, though.
> [...] the part that is relevant to LLVM as opposed to clang, is
> supporting architectures where the minimum addressable unit is
> not 8 bits in size.

The C standard don't make any distinction between front-end and back-end parts of the implementation. Therefore, this is not excluded.

Having a different byte size in the C implementation than supported by the ISA is mostly of theoretical value, and not what I intended here.

/Patrik Hägglund

-----Original Message-----
From: Owen Anderson [mailto:resistor at mac.com] 
Sent: den 19 oktober 2012 21:45
To: Patrik Hägglund H
Cc: Jakob Stoklund Olesen; llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] [llvm-commits] [cfe-commits] [PATCH] [llvm+clang] memset for non-8-bit bytes


On Oct 19, 2012, at 11:43 AM, Patrik Hägglund H <patrik.h.hagglund at ericsson.com> wrote:

>> I'm a bit confused by this concept. 
> 
> For the term byte, I use the "archaic" definition in the C (and C++) standard (section 3.6):
> 
>  addressable unit of data storage large enough to hold any member of the basic character
>  set of the execution environment

That definition isn't really relevant to LLVM, though.  You can define char to be (say) 16 bits, and your frontend (clang?) just needs to set CHAR_BIT properly, and generate code with i16 whenever you wrote char.

I suspect what you want to talk about, and the part that is relevant to LLVM as opposed to clang, is supporting architectures where the minimum addressable unit is not 8 bits in size.

--Owen



More information about the llvm-dev mailing list