RFC: PATCH: Require and use int64 for x86 options
H.J. Lu
hjl.tools@gmail.com
Fri Aug 5 00:50:00 GMT 2011
On Thu, Aug 4, 2011 at 4:44 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Aug 4, 2011 at 3:46 PM, Joseph S. Myers <joseph@codesourcery.com> wrote:
>> On Thu, 4 Aug 2011, H.J. Lu wrote:
>>
>>> Here is the updated patch to get proper HOST_WIDE_INT bits and 1
>>> through a new file, opt-gen.c. OK for trunk?
>>
>> Using another generator program like this can't be the best approach
>> (apart from anything else, when built for the build system hwint.h should
>> reflect the build system types not the host system types; cf.
>> <http://gcc.gnu.org/ml/gcc/2010-08/msg00111.html> where I suspected that
>> sort of host/build confusion of causing a reported build failure).
>>
>> You want opth-gen.awk to know the number of bits to give errors. Note
>> that the errors are given by generating #error into the output file. It's
>> easy enough to generate #if conditions into the file that compare with
>> HOST_BITS_PER_WIDE_INT.
>>
>> You want opth-gen.awk to know whether to use 1LL as the shifted constant.
>> You can easily enough make hwint.h contain a HOST_WIDE_INT_1 macro,
>> defined to 1L or 1LL as appropriate.
>>
>
>
> Here is the updated patch. OK for trunk?
>
Small update. Replace 1LL with HOST_WIDE_INT_1 in PTA_XXX.
OK for trunk?
Thanks.
--
H.J.
---
2011-08-04 H.J. Lu <hongjiu.lu@intel.com>
Igor Zamyatin <igor.zamyatin@intel.com>
* hwint.h (HOST_WIDE_INT_1): New.
* opt-functions.awk (switch_bit_fields): Initialize the
host_wide_int field.
(host_wide_int_var_name): New.
(var_type_struct): Check and return HOST_WIDE_INT.
* opt-read.awk: Handle HOST_WIDE_INT for "Variable".
* optc-save-gen.awk: Support HOST_WIDE_INT on var_target_other.
* opth-gen.awk: Use HOST_WIDE_INT_1 on HOST_WIDE_INT. Properly
check masks for HOST_WIDE_INT.
* opts-common.c (set_option): Support HOST_WIDE_INT Flag_var.
* opts.h (cl_option): Add cl_host_wide_int. Change var_value
to HOST_WIDE_INT.
* config/i386/i386-c.c (ix86_target_macros_internal): Replace int
with HOST_WIDE_INT for isa_flag.
(ix86_pragma_target_parse): Replace int with HOST_WIDE_INT for
isa variables.
* config/i386/i386.c (ix86_target_string): Replace int with
HOST_WIDE_INT for isa. Use HOST_WIDE_INT_PRINT to print isa.
(ix86_target_opts): Replace int with HOST_WIDE_INT on mask.
(pta_flags): Removed.
(PTA_XXX): Redefined as (HOST_WIDE_INT_1 << X).
(pta): Use HOST_WIDE_INT on flags.
(builtin_isa): Use HOST_WIDE_INT on isa.
(ix86_add_new_builtins): Likewise.
(def_builtin): Use HOST_WIDE_INT on mask.
(def_builtin_const): Likewise.
(builtin_description): Likewise.
* config/i386/i386.opt (ix86_isa_flags): Replace int with
HOST_WIDE_INT.
(ix86_isa_flags_explicit): Likewise.
(x_ix86_isa_flags_explicit): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-x86-int64-6.patch
Type: text/x-diff
Size: 16869 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20110805/fc38de54/attachment.bin>
More information about the Gcc
mailing list