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]
Other format: [Raw text]

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.


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