[LLVMdev] 16 bit integers

Alireza.Moshtaghi at microchip.com Alireza.Moshtaghi at microchip.com
Wed Mar 19 14:17:07 PDT 2008

Yes, I am working on an 8-bit target and I am only interested in C. We
have made some progress in adapting llvm to lower and generate the
target instructions from the current llvm-gcc output, however, we would
like to have 16-bit int type for this target, and currently, llvm-gcc
assumes 32-bit int, and of course, 32-bit integer promotions.
I know some other ports of gcc have 16-bit int type, so I am looking for
a way to configure (or if needed to modify) the front-end to generate
16-bit int type and only promote the integer calculation to 16-bit.
Ideally I would like to disable the integer promotions in the front-end
(going out of the standard for performance purposes) and take care of
them in my backend as needed.


-----Original Message-----
From: Chris Lattner [mailto:sabre at nondot.org] 
Sent: Wednesday, March 19, 2008 2:15 PM
To: LLVM Developers Mailing List
Cc: Alireza Moshtaghi - C13012
Subject: Re: [LLVMdev] 16 bit integers

On Wed, 19 Mar 2008, Duncan Sands wrote:
>> How can I build the front-end to generate 16-bit integers?
> Please clarify your question.
> If you are asking how to build llvm-gcc for a 16 bit target,
> I think the answer is: (1) gcc itself doesn't support 16 bit
> targets; (2) llvm doesn't currently support any 16 bit targets
> (but could with a little work).  So you are out of luck unless
> you are willing to work on it.

Note that if you only care about C/ObjC (not C++, fortran, ada, etc)
clang may be a good option for you.



More information about the llvm-dev mailing list