This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Make SImode as default mode for INT type.
- From: Umesh Kalappa <umesh dot kalappa0 at gmail dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Cc: Ian Lance Taylor <iant at google dot com>
- Date: Fri, 6 Dec 2013 16:10:02 +0530
- Subject: Make SImode as default mode for INT type.
- Authentication-results: sourceware.org; auth=none
Hi all,
We are re-targeting the gcc 4.8.1 to the 16 bit core ,where word =int
= short = pointer= 16 , char = 8 bit and long =32 bit.
We model the above requirement as
#define BITS_PER_UNIT 8
#define BITS_PER_WORD 16
#define UNITS_PER_WORD 2
#define POINTER_SIZE 16
#define SHORT_TYPE_SIZE 16
#define INT_TYPE_SIZE 16
#define LONG_TYPE_SIZE 32
#define FLOAT_TYPE_SIZE 16
#define DOUBLE_TYPE_SIZE 32
Tried to compile the below sample by retargeted compiler
int a =10;
int b =10;
int func()
{
return a+ b;
}
the compiler is stating that the a and b are global with short type(HI
mode) of size 2 bytes.
where as we need the word mode as SI not HI ,I do understand that the
SI and HI modes are of same size but till I insist better to have SI
mode.
Please somebody or expert in the group share their thought on the
same like how do we can achieve this ?
Thanks
~Umesh