[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 13:38:24 PDT 2012
> 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.
Sorry, but this is naive. As a starting point (many more changes are needed), I suggest you take a look at this patch (not provided by me) refered in my originial email: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120702/146050.html
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.
More information about the llvm-dev