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: [i386] __builtin_ia32_stmxcsr could be pure


Hello!

> glibc marks fegetround as a pure function. On x86, people tend to use
> _MM_GET_ROUNDING_MODE instead, which could benefit from the same. I think it is safe, but
> a second opinion would be welcome. I could have handled just this builtin, but it seemed better to
> provide def_builtin_pure (like "const" already has) since there should be other builtins that can be
> marked this way (maybe the gathers?).
>
> Bootstrap+testsuite on x86_64-pc-linux-gnu with default languages.
>
> 2017-05-29  Marc Glisse  <marc.glisse@inria.fr>
>
> gcc/
> * config/i386/i386.c (struct builtin_isa): New field pure_p.
> Reorder for compactness.
> (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
> (def_builtin_pure, def_builtin_pure2): New functions.
> (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
>
> gcc/testsuite/
> * gcc.target/i386/getround.c: New file.

OK.

Thanks,
Uros.


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