This is the mail archive of the gcc-patches@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: [trunk]: Patch to move BITS_PER_UNIT to be available for genmodes.c


On 12/11/13 17:35, Kenneth Zadeck wrote:


This patch is for the trunk, but it solves a problem that comes up for wide-int.   For wide-int we
need to have the BITS_PER_UNIT available earlier.    So this patch sets the default value (8) in
genmodes.c so that it is available by anyone who includes insn-modes.h.  The generator for tm.h was
modified to include insn-modes.h.    The value for BITS_PER_UNIT can be overridden by any port by
placing a define for it in their target modes file.

This patch removes the definition of BITS_PER_UNIT from 7 platform .h files.   All of those
platforms initialized it to the default value so there was no need for additions to their target
modes file.

In addition, this target also changes the way that MAX_BITSIZE_MODE_ANY_INT is calculated.    The
value is heavily used on the wide-int branch to allocate buffers that are used to hold large integer
values.   The change in the way it is computed was motivated by the i386 port, but there may be
other ports that have the same problem.   The i386 port defines two very large integer modes that
are only used as containers for large vectors.   They are never used for large integers.  The new
way of computing this allows a port to say (very early) that some of these integer modes are never
used to hold numbers and so smaller buffers can be used for integer calculations. Other ports that
play the same game should follow suit.

This patch has been bootstrapped and regression tested on x86-64. Ok to commit?

OK for MicroBlaze.


--
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


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