This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Calculation of displacement of a variable.
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: cjaiprakash at noida dot hcltech dot com (C Jaiprakash, Noida)
- Cc: gcc at gcc dot gnu dot org ('gcc at gcc dot gnu dot org')
- Date: Fri, 31 Oct 2003 10:56:14 +0000 (GMT)
- Subject: Re: Calculation of displacement of a variable.
> Is it possible to generate such displacements in gcc? Basically definitions
> of BITS_PER_UNIT and UNITS_PER_WORD here are dependent on mode,
> i.e for
> QImode : BITS_PER_UNIT = 8, UNITS_PER_WORD = 2
> HImode : BITS_PER_UNIT = 16, UNITS_PER_WORD = 1
> SImode : BITS_PER_UNIT = 16, UNITS_PER_WORD = 1
If you are talking about constant displacements that are encoded in the
instruction, these can be encoded any way you like with appropriate
output template codes and their handling in PRINT_OPERAND.
FWIW, other architectures (e.g. SH) hide scaled offsets from the programmer,
and have the assembler do the encoding.