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: [PATCH, i386, Pointer Bounds Checker 17/x] Pointer bounds constants support


2014-06-04 10:58 GMT+04:00 Jeff Law <law@redhat.com>:
> On 06/02/14 04:25, Ilya Enkovich wrote:
>>
>> Hi,
>>
>> This patch adds support for pointer bounds constants to be used as
>> DECL_INITIAL for constant bounds (like zero bounds).
>>
>> Bootstrapped and tested on linux-x86_64.
>>
>> Thanks,
>> Ilya
>> --
>> gcc/
>>
>> 2014-05-30  Ilya Enkovich  <ilya.enkovich@intel.com>
>>
>>         * emit-rtl.c (immed_double_const): Support MODE_POINTER_BOUNDS.
>>         (init_emit_once): Build pointer bounds zero constants.
>>         * explow.c (trunc_int_for_mode): Likewise.
>>         * varpool.c (ctor_for_folding): Do not fold constant
>>         bounds vars.
>>         * varasm.c (output_constant_pool_2): Support MODE_POINTER_BOUNDS.
>>         * config/i386/i386.c (ix86_legitimate_constant_p): Mark
>>         bounds constant as not valid.
>
>
> [ ... ]
>
>
>>
>> @@ -5875,6 +5876,11 @@ init_emit_once (void)
>>     if (STORE_FLAG_VALUE == 1)
>>       const_tiny_rtx[1][(int) BImode] = const1_rtx;
>>
>> +  for (mode = GET_CLASS_NARROWEST_MODE (MODE_POINTER_BOUNDS);
>> +       mode != VOIDmode;
>> +       mode = GET_MODE_WIDER_MODE (mode))
>> +    const_tiny_rtx[0][mode] = immed_double_const (0, 0, mode);
>
> I'm pretty sure GET_CLASS_NARROWEST_MODE should be taking a class, not a
> mode as its argument.  So something is clearly wrong here...

MODE_POINTER_BOUNDS is a class. Modes in this class are BND32mode and BND64mode.

Ilya
>
>
> jeff


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