[LLVMdev] Non-standard byte sizes
David Given
dg at cowlark.com
Fri Jan 28 03:29:19 PST 2011
For a hypothetical Evil Project(tm), I would like to do a LLVM backend
for a virtual machine that does not use 8-bit bytes. Does LLVM support
this sort of thing?
The details are: each addressing unit in the virtual machine can store a
single value of any type, except for data pointers, which are stored as
pairs (handle and offset). As such, sizeof(char) == sizeof(int) ==
sizeof(long long) == sizeof(float) == sizeof(double) ==
sizeof(void(*)()) == 1, and sizeof(void*) == 2.
I did achieve success with another compiler framework a while back ---
but I did have to fix some bugs in it first. This isn't something people
tend to want to do much!
On a related note, I remember seeing compile-time flags to clang to tell
it the sizes of the various primitive types, but I can't find them any
more. Do they still exist or will I need to do a custom clang build to
change them?
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ }
│ --- Conway's Game Of Life, in one line of APL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110128/1a32080a/attachment.sig>
More information about the llvm-dev
mailing list