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] Intrinsics for ADCX


On Fri, Aug 3, 2012 at 3:24 PM, Michael Zolotukhin
<michael.v.zolotukhin@gmail.com> wrote:
> Hi,
> I made a new version of the patch, where I tried to take into account
> Uros' remarks - is it ok for trunk?
>
> Bootstrap and new tests are passing, testing is in progress.
>
> Changelog entry:
> 2012-08-03 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
>
>         * common/config/i386/i386-common.c (OPTION_MASK_ISA_ADX_SET): New.
>         (OPTION_MASK_ISA_ADX_UNSET): Likewise.
>         (ix86_handle_option): Handle madx option.
>         * config.gcc (i[34567]86-*-*): Add adxintrin.h.
>         (x86_64-*-*): Likewise.
>         * config/i386/adxintrin.h: New header.
>         * config/i386/driver-i386.c (host_detect_local_cpu): Detect ADCX/ADOX
>         support.
>         * config/i386/i386-builtin-types.def
>         (UCHAR_FTYPE_UCHAR_UINT_UINT_PINT): New function type.
>         (UCHAR_FTYPE_UCHAR_ULONGLONG_ULONGLONG_PINT): Likewise.
>         * config/i386/i386-c.c: Define __ADX__ if needed.
>         * config/i386/i386.c (ix86_target_string): Define -madx option.
>         (PTA_ADX): New.
>         (ix86_option_override_internal): Handle new option.
>         (ix86_valid_target_attribute_inner_p): Add OPT_madx.
>         (ix86_builtins): Add IX86_BUILTIN_ADDCARRYX32,
>         IX86_BUILTIN_ADDCARRYX64.
>         (ix86_init_mmx_sse_builtins): Define corresponding built-ins.
>         (ix86_expand_builtin): Handle these built-ins.
>         (ix86_expand_args_builtin): Handle new function types.
>         * config/i386/i386.h (TARGET_ADX): New.
>         * config/i386/i386.md (adcx<mode>3): New define_insn.
>         * config/i386/i386.opt (madx): New.
>         * config/i386/x86intrin.h: Include adxintrin.h.
>
> testsuite/Changelog entry:
> 2012-08-03 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
>
>         * gcc.target/i386/adx-addcarryx32-1.c: New.
>         * gcc.target/i386/adx-addcarryx32-2.c: New.
>         * gcc.target/i386/adx-addcarryx64-1.c: New.
>         * gcc.target/i386/adx-addcarryx64-2.c: New.
>         * gcc.target/i386/adx-check.h: New.
>         * gcc.target/i386/i386.exp (check_effective_target_adx): New.
>         * gcc.target/i386/sse-12.c: Add -madx.
>         * gcc.target/i386/sse-13.c: Ditto.
>         * gcc.target/i386/sse-14.c: Ditto.
>         * gcc.target/i386/sse-22.c: Ditto.
>         * gcc.target/i386/sse-23.c: Ditto.
>         * g++.dg/other/i386-2.C: Ditto.
>         * g++.dg/other/i386-3.C: Ditto.

Just change this line:

+      op4 = gen_rtx_REG (CCmode, FLAGS_REG);

back to CCCmode.

OK with this change.

Thanks,
Uros.


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