[cfe-dev] [LLVMdev] Non-standard byte sizes
dg at cowlark.com
Fri Jan 28 13:57:17 PST 2011
On 28/01/11 14:14, Ken Dyck wrote:
> I've developed an LLVM back end for a DSP with 24-bit word-addressable
> memory, basically by defining the alignment of i8 to be the word size
> of the machine. So it _is_ possible.
I think I might have an easier job of it, as I don't want to use any of
the standard C sizes at all --- my char will be ~64 bits wide (in fact,
my hypothetical VM stores all values as doubles) and will occupy one
complete storage cell, so I don't need to do anything as weird as
storing values of one size in a storage cell of another size.
From what you've said it sounds like all I need to do is to do the right
thing when lowering getelementptr, and it will all Just Work.
Unfortunately I know from experience that clang doesn't always use
getelementptr when doing point arithmetic --- how can I stop it trying
to advance a pointer by one (64-bit) char by adding eight to it?
(Also, how do I change the size of the built-in types in clang? I could
swear I once saw some command-line options to do this, but can't find
them now. And I can't find any documentation for clang's -cc1 mode...)
┌─── ｄｇ＠ｃｏｗｌａｒｋ．ｃｏｍ ───── http://www.cowlark.com ─────
│ "I have a mind like a steel trap. It's rusty and full of dead mice."
│ --- Anonymous, on rasfc
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 254 bytes
Desc: OpenPGP digital signature
More information about the cfe-dev