This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386]: Switch x86 to TARGET_SUPPORTS_WIDE_INT
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>, "Zamyatin, Igor" <igor dot zamyatin at intel dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Thu, 30 Apr 2015 12:08:41 -0700
- Subject: Re: [PATCH, i386]: Switch x86 to TARGET_SUPPORTS_WIDE_INT
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4Yok8wdF4jP30WRegRkLTKy-F-Bu-8h4iJgzbyg7T=igw at mail dot gmail dot com>
On Thu, Apr 30, 2015 at 12:01 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> Hello!
>
> Attached patch switches x86 to TARGET_SUPPORTS_WIDE_INT.
>
> The patch builds on the fact that build requires
> HOST_BITS_PER_WIDE_INT = 64 capable host. Taking this in account,
> noticeable blocks of code can be removed, and all but one
> immed_double_const can be removed.
>
> The only wide-int mode that remains is TImode.
>
> 2015-04-30 Uros Bizjak <ubizjak@gmail.com>
>
> * config/i386/i386.h (TARGET_SUPPORTS_WIDE_INT): New define.
> * config/i386/i386.c (ix86_legitimate_constant_p): Handle TImode
> as CONST_WIDE_INT, not CONST_DOUBLE.
> (ix86_cannot_force_const_mem): Handle CONST_WIDE_INT.
> (output_pic_addr_const): Do not handle VOIDmode CONST_DOUBLEs.
> (ix86_find_base_term): Do not check for CONST_DOUBLE.
> (ix86_print_operand): Do not handle non-FPmode CONST_DOUBLEs.
> (ix86_build_signbit_mask): Rewrite using wide ints.
> (ix86_split_to_parts) [HOST_BITS_PER_WIDE_INT < 64]: Remove.
> (ix86_rtx_costs): Handle CONST_WIDE_INT.
> (find_constant): Ditto.
> * config/i386/i386.md (bts, btr, btc peepholes): Rewrite
> using gen_int_mode.
> * config/i386/predicates.md (x86_64_immediate_operand)
> <case CONST_INT>: Remove HOST_BITS_PER_WIDE_INT == 32 code.
> (x86_64_zext_immediate_operand): Remove CONST_DOUBLE handling.
> <case CONST_INT>: Remove HOST_BITS_PER_WIDE_INT == 32 code.
> (const0_operand): Also match const_wide_int.
> (constm1_operand): Ditto.
> (const1_operand): Ditto.
>
> Patch was bootstrapped and regression tested on x86_64-linux-gnu
> {,-m32} and i686-linux-gnu.
>
> I won't be able to commit the patch until Monday. H.J., can you please
> test it on your SPEC testers, so there won't be any surprises w.r.t.
> performance issues.
Hi Igor,
Can your team run SPEC CPU on this patch?
Thanks.
--
H.J.