2016-11-19 Jakub Jelinek <jakub@redhat.com>
+ * config/i386/i386.c (def_builtin, def_builtin2, def_builtin_const2,
+ ix86_add_new_builtins): Formatting fixes.
+ (ix86_expand_builtin): Use || instead of && for isa vs. isa2.
+ (ix86_get_builtin): Likewise.
+
* config/i386/i386.c (ix86_expand_builtin): Remove msk_mov variable,
don't initialize it, don't use it for the case where it isn't
provable %{z} nor using the same argument, instead move merge
means that *both* cpuid bits must be set for the built-in to be available.
Handle this here. */
if (mask & ix86_isa_flags & OPTION_MASK_ISA_AVX512VL)
- mask &= ~OPTION_MASK_ISA_AVX512VL;
+ mask &= ~OPTION_MASK_ISA_AVX512VL;
mask &= ~OPTION_MASK_ISA_64BIT;
if (mask == 0
static inline tree
def_builtin2 (HOST_WIDE_INT mask, const char *name,
- enum ix86_builtin_func_type tcode,
- enum ix86_builtins code)
+ enum ix86_builtin_func_type tcode,
+ enum ix86_builtins code)
{
tree decl = NULL_TREE;
tree type = ix86_get_builtin_func_type (tcode);
decl = add_builtin_function (name, type, code, BUILT_IN_MD,
NULL, NULL_TREE);
- ix86_builtins[(int) code] = decl;
- ix86_builtins_isa[(int) code].set_and_not_built_p = false;
+ ix86_builtins[(int) code] = decl;
+ ix86_builtins_isa[(int) code].set_and_not_built_p = false;
}
else
{
static inline tree
def_builtin_const2 (HOST_WIDE_INT mask, const char *name,
- enum ix86_builtin_func_type tcode, enum ix86_builtins code)
+ enum ix86_builtin_func_type tcode, enum ix86_builtins code)
{
tree decl = def_builtin2 (mask, name, tcode, code);
if (decl)
static void
ix86_add_new_builtins (HOST_WIDE_INT isa, HOST_WIDE_INT isa2)
{
- if (((isa & deferred_isa_values) == 0)
- && ((isa2 & deferred_isa_values2) == 0))
+ if ((isa & deferred_isa_values) == 0
+ && (isa2 & deferred_isa_values2) == 0)
return;
/* Bits in ISA value can be removed from potential isa values. */
for (i = 0; i < (int)IX86_BUILTIN_MAX; i++)
{
- if ((((ix86_builtins_isa[i].isa & isa) != 0) || ((ix86_builtins_isa[i].isa2 & isa2) != 0))
+ if (((ix86_builtins_isa[i].isa & isa) != 0
+ || (ix86_builtins_isa[i].isa2 & isa2) != 0)
&& ix86_builtins_isa[i].set_and_not_built_p)
{
tree decl, type;
whether it is supported. */
if ((ix86_builtins_isa[fcode].isa
&& !(ix86_builtins_isa[fcode].isa & ix86_isa_flags))
- && (ix86_builtins_isa[fcode].isa2
+ || (ix86_builtins_isa[fcode].isa2
&& !(ix86_builtins_isa[fcode].isa2 & ix86_isa_flags2)))
{
char *opts = ix86_target_string (ix86_builtins_isa[fcode].isa,
opts = TREE_TARGET_OPTION (target_tree);
if ((ix86_builtins_isa[(int) code].isa & opts->x_ix86_isa_flags)
- && (ix86_builtins_isa[(int) code].isa2 & opts->x_ix86_isa_flags2))
+ || (ix86_builtins_isa[(int) code].isa2 & opts->x_ix86_isa_flags2))
return ix86_builtin_decl (code, true);
else
return NULL_TREE;