On 10/05/2012 01:29 PM, Richard Sandiford wrote:
+/* This is the maximal size of the buffer needed for dump. */
>>+const int MAX = (MAX_BITSIZE_MODE_ANY_INT / 4
>>+ + MAX_BITSIZE_MODE_ANY_INT / HOST_BITS_PER_WIDE_INT + 32);
>>
>>I'd prefer a target macro for this, not anything based off
>>MAX_BITSIZE_MODE_ANY_INT just to allow no-op transition of a
>>target to wide-ints (which IMHO should be the default for all targets,
>>simplifying the patch).
Kenny didn't comment on this, but I disagree. Part of the process of
"converting" a port is to ween it off any assumptions about the number
of HWIs.
i also disagree. my patch is littered with are places like this.
consider:
@@ -5180,13 +4808,11 @@ static rtx
simplify_immed_subreg (enum machine_mode outermode, rtx op,
enum machine_mode innermode, unsigned int byte)
{
- /* We support up to 512-bit values (for V8DFmode). */
enum {
- max_bitsize = 512,
value_bit = 8,
value_mask = (1 << value_bit) - 1
};
- unsigned char value[max_bitsize / value_bit];
+ unsigned char value [MAX_BITSIZE_MODE_ANY_MODE/value_bit];
int value_start;
int i;
int elem;
Would you want do have a target macro for this also?
The code works no matter what. we do not need to be chasing this kind of
problem all over the place.
kenny