This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

128 bits addresses


Hi,
i'm writing a port of gcc for a machine that addresses memory with units
of 128 bits.
To have correct addresses generation i have to set BITS_PER_UNIT to 128,
this (strange I think) 
causes machine mode sizes to grow up, so that I have to change them in
machmode.def.
Is it correct?
The problem is that in a 32 bit hosts (i.e. IA-32) gcc cannot represent
128bit costants and it crashes. For instance in immed_double_const.

Leaving BITS_PER_UNIT==8 is not right for addresses, because registers
are 128 bits and, for example, in:

int array[100];
array[1] = 0;

it generates code to access address array+8, which is false.

For our last machine, that was a 64bit regs & 64 bits memory units, I
changed BITS_PER_UNIT and machine mode sizes: it worked fine.

I know that gcc is made for 32bit machines that address memory at units
of 8 bits, I'd like to know if anyone has already found (and solved)
this problem, or/and if there is any intention to generalize the way gcc
addresses memory.

Thank you in advance.
Benedetto Proietti

/---------------------------------------------------------\
| Benedetto Proietti                                      |
| INFN - Italian National Institute for Nuclear Physics   |
| apeNEXT project, APE group                              |
|                                                         |
| benedetto.proietti@roma1.infn.it; betto@ifh.de          |
| Tel. +49-33-76277494                                    |
\---------------------------------------------------------/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]