[LLVMdev] C int type for 48bits cpu

Duncan Sands baldrick at free.fr
Thu Sep 5 02:19:44 PDT 2013

Hi Jonathan,

> LLVM only support primitive type i32 and i64, no i48. The clang translate "C int
> type" to i32 too. My question is if a cpu is 48 bits register size, how to write
> the backend for 48 bits register architecture. Can someone help me with this
> problem?

the type legalizer expects legal integer types to have a power of 2 size.
For someone who knows what they are doing it wouldn't be too hard to generalize
this to allow arbitrary sizes, such as 48, but unfortunately no-one did this

Ciao, Duncan.

More information about the llvm-dev mailing list