Commit 76ad42ec authored by Jeff Chapman's avatar Jeff Chapman

update to current svn

parent 462f6702
This diff is collapsed.
2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute):
Document additional optional parameters.
* sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept
more than one optional parameter.
* gcc-interface/decl.c (prepend_one_attribute_pragma): Alphabetize
the list of supported pragmas. Simplify the handling of parameters
and add support for more than one optional parameter.
* gcc-interface/utils.c (attr_cold_hot_exclusions): New constant.
(gnat_internal_attribute_table): Add entry for no_icf, noipa, flatten,
used, cold, hot, target and target_clones.
(begin_subprog_body): Do not create the RTL for the subprogram here.
(handle_noicf_attribute): New static function.
(handle_noipa_attribute): Likewise.
(handle_flatten_attribute): Likewise.
(handle_used_attribute): Likewise.
(handle_cold_attribute): Likewise.
(handle_hot_attribute): Likewise.
(handle_target_attribute): Likewise.
(handle_target_clones_attribute): Likewise.
2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (lvalue_required_for_attribute_p): Return 0
for 'Size too.
(Identifier_to_gnu): Use the actual subtype for a reference to a
packed array in a return statement.
(Attribute_to_gnu) <Attr_Size>: Do not strip VIEW_CONVERT_EXPRs from
the prefix in every case.
2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu): Remove superfluous tests on
Backend_Overflow_Checks_On_Target and rework comments.
2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (walk_nesting_tree): New static function.
(finalize_nrv): Use it to walk the entire nesting tree.
2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Remove
obsolete test on Is_For_Access_Subtype.
2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (components_to_record): Set a name on the type
created for the REP part, if any.
* gcc-interface/utils.c (finish_record_type): Only take the maximum
when merging sizes for a variant part at offset 0.
(merge_sizes): Rename has_rep parameter into max.
2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (gnat_internal_attribute_table): Add support
for stack_protect attribute.
(handle_stack_protect_attribute): New static function.
2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
false if the internal builtin uses a variable list.
2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Call_to_gnu): Do not initialize the temporary
created out of addressability concerns if it's for the _Init parameter
of an initialization procedure.
2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/ada-builtin-types.def: New file.
* gcc-interface/ada-builtins.def: Likewise.
* gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
(BUILT_IN_UNLIKELY): Likewise.
* gcc-interface/trans.c (independent_iterations_p): Initialize the
auto-vector to 16 elements.
(Call_to_gnu): Remove local variable and change the vector of actual
parameters to an auto-vector. Do not convert actual parameters to
the argument type for front-end built-in functions. Add support for
front-end built-in functions.
(build_noreturn_cond): Use internal instead of built-in function.
* gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
(install_builtin_function_types): Likewise.
(install_builtin_functions): Include ada-builtins.def first.
2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (maybe_pad_type): Issue the warning for the
specific case of component types preferably.
2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
(gnat_to_gnu): Do not convert the result if it is a reference to an
unconstrained array used as the prefix of an attribute reference that
requires an lvalue.
2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
(Identifier_to_gnu): Use it to assert that the type of the identifier
and that of its entity are compatible for gigi. Rename a couple of
local variables and separate the processing of the result type.
2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
putting back an intermediate conversion the type of the actuals.
2019-05-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu) <Shift operations>: Convert the
count to the unsigned version of its base type before proceeding.
2019-05-16 Martin Sebor <msebor@redhat.com>
* gcc-interface/trans.c (check_inlining_for_nested_subprog): Quote
......
......@@ -3766,18 +3766,19 @@ Syntax:
pragma Machine_Attribute (
[Entity =>] LOCAL_NAME,
[Attribute_Name =>] static_string_EXPRESSION
[, [Info =>] static_EXPRESSION] );
[, [Info =>] static_EXPRESSION {, static_EXPRESSION}] );
Machine-dependent attributes can be specified for types and/or
declarations. This pragma is semantically equivalent to
:samp:`__attribute__(({attribute_name}))` (if ``info`` is not
specified) or :samp:`__attribute__(({attribute_name(info})))`
in GNU C, where *attribute_name* is recognized by the
compiler middle-end or the ``TARGET_ATTRIBUTE_TABLE`` machine
specific macro. A string literal for the optional parameter ``info``
is transformed into an identifier, which may make this pragma unusable
for some attributes.
or :samp:`__attribute__(({attribute_name(info,...})))` in GNU C,
where *attribute_name* is recognized by the compiler middle-end
or the ``TARGET_ATTRIBUTE_TABLE`` machine specific macro. Note
that a string literal for the optional parameter ``info`` or the
following ones is transformed by default into an identifier,
which may make this pragma unusable for some attributes.
For further information see :title:`GNU Compiler Collection (GCC) Internals`.
Pragma Main
......
/* This file contains the type definitions for the builtins exclusively
used in the GNU Ada compiler.
Copyright (C) 2019 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* See builtin-types.def for details. */
DEF_FUNCTION_TYPE_1 (BT_FN_BOOL_BOOL, BT_BOOL, BT_BOOL)
DEF_FUNCTION_TYPE_2 (BT_FN_BOOL_BOOL_BOOL, BT_BOOL, BT_BOOL, BT_BOOL)
/* This file contains the definitions for the builtins exclusively used
in the GNU Ada compiler.
Copyright (C) 2019 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* Before including this file, you should define a macro:
DEF_ADA_BUILTIN (ENUM, NAME, TYPE, ATTRS)
See builtins.def for details. */
DEF_ADA_BUILTIN (BUILT_IN_EXPECT, "expect", BT_FN_BOOL_BOOL_BOOL, ATTR_CONST_NOTHROW_LEAF_LIST)
DEF_ADA_BUILTIN (BUILT_IN_LIKELY, "likely", BT_FN_BOOL_BOOL, ATTR_CONST_NOTHROW_LEAF_LIST)
DEF_ADA_BUILTIN (BUILT_IN_UNLIKELY, "unlikely", BT_FN_BOOL_BOOL, ATTR_CONST_NOTHROW_LEAF_LIST)
......@@ -6,7 +6,7 @@
* *
* C Header File *
* *
* Copyright (C) 1992-2018, Free Software Foundation, Inc. *
* Copyright (C) 1992-2019, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
......@@ -582,3 +582,8 @@ do { \
#define EXIT_STMT_COND(NODE) TREE_OPERAND_CHECK_CODE (NODE, EXIT_STMT, 0)
#define EXIT_STMT_LABEL(NODE) TREE_OPERAND_CHECK_CODE (NODE, EXIT_STMT, 1)
/* Small kludge to be able to define Ada built-in functions locally.
We overload them on top of the HSAIL/BRIG builtin functions. */
#define BUILT_IN_LIKELY BUILT_IN_HSAIL_WORKITEMABSID
#define BUILT_IN_UNLIKELY BUILT_IN_HSAIL_GRIDSIZE
......@@ -3373,7 +3373,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
Unchecked_Union (it must be an Itype), just return the type. */
if (Has_Discriminants (gnat_entity)
&& Stored_Constraint (gnat_entity) != No_Elist
&& !Is_For_Access_Subtype (gnat_entity)
&& Is_Record_Type (gnat_base_type)
&& !Is_Unchecked_Union (gnat_base_type))
{
......@@ -6459,25 +6458,18 @@ prepend_one_attribute (struct attrib **attr_list,
static void
prepend_one_attribute_pragma (struct attrib **attr_list, Node_Id gnat_pragma)
{
const Node_Id gnat_arg = Pragma_Argument_Associations (gnat_pragma);
tree gnu_arg0 = NULL_TREE, gnu_arg1 = NULL_TREE;
const Node_Id gnat_arg = First (Pragma_Argument_Associations (gnat_pragma));
Node_Id gnat_next_arg = Next (gnat_arg);
tree gnu_arg1 = NULL_TREE, gnu_arg_list = NULL_TREE;
enum attrib_type etype;
/* Map the pragma at hand. Skip if this isn't one we know how to handle. */
switch (Get_Pragma_Id (Chars (Pragma_Identifier (gnat_pragma))))
{
case Pragma_Machine_Attribute:
etype = ATTR_MACHINE_ATTRIBUTE;
break;
case Pragma_Linker_Alias:
etype = ATTR_LINK_ALIAS;
break;
case Pragma_Linker_Section:
etype = ATTR_LINK_SECTION;
break;
case Pragma_Linker_Constructor:
etype = ATTR_LINK_CONSTRUCTOR;
break;
......@@ -6486,58 +6478,58 @@ prepend_one_attribute_pragma (struct attrib **attr_list, Node_Id gnat_pragma)
etype = ATTR_LINK_DESTRUCTOR;
break;
case Pragma_Weak_External:
etype = ATTR_WEAK_EXTERNAL;
case Pragma_Linker_Section:
etype = ATTR_LINK_SECTION;
break;
case Pragma_Machine_Attribute:
etype = ATTR_MACHINE_ATTRIBUTE;
break;
case Pragma_Thread_Local_Storage:
etype = ATTR_THREAD_LOCAL_STORAGE;
break;
case Pragma_Weak_External:
etype = ATTR_WEAK_EXTERNAL;
break;
default:
return;
}
/* See what arguments we have and turn them into GCC trees for attribute
handlers. These expect identifier for strings. We handle at most two
arguments and static expressions only. */
if (Present (gnat_arg) && Present (First (gnat_arg)))
handlers. The first one is always expected to be a string meant to be
turned into an identifier. The next ones are all static expressions,
among which strings meant to be turned into an identifier, except for
a couple of specific attributes that require raw strings. */
if (Present (gnat_next_arg))
{
Node_Id gnat_arg0 = Next (First (gnat_arg));
Node_Id gnat_arg1 = Empty;
if (Present (gnat_arg0)
&& Is_OK_Static_Expression (Expression (gnat_arg0)))
gnu_arg1 = gnat_to_gnu (Expression (gnat_next_arg));
gcc_assert (TREE_CODE (gnu_arg1) == STRING_CST);
const char *const p = TREE_STRING_POINTER (gnu_arg1);
const bool string_args
= strcmp (p, "target") == 0 || strcmp (p, "target_clones") == 0;
gnu_arg1 = get_identifier (p);
if (IDENTIFIER_LENGTH (gnu_arg1) == 0)
return;
gnat_next_arg = Next (gnat_next_arg);
while (Present (gnat_next_arg))
{
gnu_arg0 = gnat_to_gnu (Expression (gnat_arg0));
if (TREE_CODE (gnu_arg0) == STRING_CST)
{
gnu_arg0 = get_identifier (TREE_STRING_POINTER (gnu_arg0));
if (IDENTIFIER_LENGTH (gnu_arg0) == 0)
return;
}
gnat_arg1 = Next (gnat_arg0);
}
if (Present (gnat_arg1)
&& Is_OK_Static_Expression (Expression (gnat_arg1)))
{
gnu_arg1 = gnat_to_gnu (Expression (gnat_arg1));
if (TREE_CODE (gnu_arg1) == STRING_CST)
gnu_arg1 = get_identifier (TREE_STRING_POINTER (gnu_arg1));
tree gnu_arg = gnat_to_gnu (Expression (gnat_next_arg));
if (TREE_CODE (gnu_arg) == STRING_CST && !string_args)
gnu_arg = get_identifier (TREE_STRING_POINTER (gnu_arg));
gnu_arg_list
= chainon (gnu_arg_list, build_tree_list (NULL_TREE, gnu_arg));
gnat_next_arg = Next (gnat_next_arg);
}
}
/* Prepend to the list. Make a list of the argument we might have, as GCC
expects it. */
prepend_one_attribute (attr_list, etype, gnu_arg0,
gnu_arg1
? build_tree_list (NULL_TREE, gnu_arg1) : NULL_TREE,
Present (Next (First (gnat_arg)))
? Expression (Next (First (gnat_arg))) : gnat_pragma);
prepend_one_attribute (attr_list, etype, gnu_arg1, gnu_arg_list,
Present (Next (gnat_arg))
? Expression (Next (gnat_arg)) : gnat_pragma);
}
/* Prepend to ATTR_LIST the list of attributes for GNAT_ENTITY, if any. */
......@@ -8162,6 +8154,8 @@ components_to_record (Node_Id gnat_component_list, Entity_Id gnat_record_type,
gnu_field_list = gnu_rep_list;
else
{
TYPE_NAME (gnu_rep_type)
= create_concat_name (gnat_record_type, "REP");
TYPE_REVERSE_STORAGE_ORDER (gnu_rep_type)
= TYPE_REVERSE_STORAGE_ORDER (gnu_record_type);
finish_record_type (gnu_rep_type, gnu_rep_list, 1, debug_info);
......@@ -9174,9 +9168,9 @@ intrin_arglists_compatible_p (intrin_binding_t * inb)
if (!ada_type && !btin_type)
break;
/* If one list is shorter than the other, they fail to match. */
if (!ada_type || !btin_type)
return false;
/* If the internal builtin uses a variable list, accept anything. */
if (!btin_type)
break;
/* If we're done with the Ada args and not with the internal builtin
args, or the other way around, complain. */
......
This diff is collapsed.
This diff is collapsed.
......@@ -19349,20 +19349,25 @@ package body Sem_Prag is
-----------------------
-- pragma Machine_Attribute (
-- [Entity =>] LOCAL_NAME,
-- [Attribute_Name =>] static_string_EXPRESSION
-- [, [Info =>] static_EXPRESSION] );
-- [Entity =>] LOCAL_NAME,
-- [Attribute_Name =>] static_string_EXPRESSION
-- [, [Info =>] static_EXPRESSION {, static_EXPRESSION}] );
when Pragma_Machine_Attribute => Machine_Attribute : declare
Arg : Node_Id;
Def_Id : Entity_Id;
begin
GNAT_Pragma;
Check_Arg_Order ((Name_Entity, Name_Attribute_Name, Name_Info));
if Arg_Count = 3 then
if Arg_Count >= 3 then
Check_Optional_Identifier (Arg3, Name_Info);
Check_Arg_Is_OK_Static_Expression (Arg3);
Arg := Arg3;
while Present (Arg) loop
Check_Arg_Is_OK_Static_Expression (Arg);
Arg := Next (Arg);
end loop;
else
Check_Arg_Count (2);
end if;
......@@ -541,7 +541,7 @@ aarch64_rewrite_selected_cpu (const char *name)
|| a_to_an->arch == aarch64_no_arch)
fatal_error (input_location, "unknown value %qs for %<-mcpu%>", name);
unsigned long extensions = p_to_a->flags;
uint64_t extensions = p_to_a->flags;
aarch64_parse_extension (extension_str.c_str (), &extensions, NULL);
std::string outstr = a_to_an->arch_name
......
......@@ -156,6 +156,7 @@ along with GCC; see the file COPYING3. If not see
#define OPTION_MASK_ISA_MOVDIR64B_SET OPTION_MASK_ISA_MOVDIR64B
#define OPTION_MASK_ISA_WAITPKG_SET OPTION_MASK_ISA_WAITPKG
#define OPTION_MASK_ISA_CLDEMOTE_SET OPTION_MASK_ISA_CLDEMOTE
#define OPTION_MASK_ISA_ENQCMD_SET OPTION_MASK_ISA_ENQCMD
/* Define a set of ISAs which aren't available when a given ISA is
disabled. MMX and SSE ISAs are handled separately. */
......@@ -238,6 +239,7 @@ along with GCC; see the file COPYING3. If not see
#define OPTION_MASK_ISA_MOVDIR64B_UNSET OPTION_MASK_ISA_MOVDIR64B
#define OPTION_MASK_ISA_WAITPKG_UNSET OPTION_MASK_ISA_WAITPKG
#define OPTION_MASK_ISA_CLDEMOTE_UNSET OPTION_MASK_ISA_CLDEMOTE
#define OPTION_MASK_ISA_ENQCMD_UNSET OPTION_MASK_ISA_ENQCMD
/* SSE4 includes both SSE4.1 and SSE4.2. -mno-sse4 should the same
as -mno-sse4.1. */
......@@ -659,6 +661,19 @@ ix86_handle_option (struct gcc_options *opts,
}
return true;
case OPT_menqcmd:
if (value)
{
opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA_ENQCMD_SET;
opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA_ENQCMD_SET;
}
else
{
opts->x_ix86_isa_flags2 &= ~OPTION_MASK_ISA_ENQCMD_UNSET;
opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA_ENQCMD_UNSET;
}
return true;
case OPT_mavx5124fmaps:
if (value)
{
......
......@@ -407,7 +407,8 @@ i[34567]86-*-*)
avx512vnnivlintrin.h vaesintrin.h vpclmulqdqintrin.h
avx512vpopcntdqvlintrin.h avx512bitalgintrin.h
pconfigintrin.h wbnoinvdintrin.h movdirintrin.h
waitpkgintrin.h cldemoteintrin.h avx512bf16vlintrin.h avx512bf16intrin.h"
waitpkgintrin.h cldemoteintrin.h avx512bf16vlintrin.h avx512bf16intrin.h
enqcmdintrin.h"
;;
x86_64-*-*)
cpu_type=i386
......@@ -439,7 +440,8 @@ x86_64-*-*)
avx512vnnivlintrin.h vaesintrin.h vpclmulqdqintrin.h
avx512vpopcntdqvlintrin.h avx512bitalgintrin.h
pconfigintrin.h wbnoinvdintrin.h movdirintrin.h
waitpkgintrin.h cldemoteintrin.h avx512bf16vlintrin.h avx512bf16intrin.h"
waitpkgintrin.h cldemoteintrin.h avx512bf16vlintrin.h avx512bf16intrin.h
enqcmdintrin.h"
;;
ia64-*-*)
extra_headers=ia64intrin.h
......@@ -506,7 +508,7 @@ powerpc*-*-*)
extra_headers="${extra_headers} ppu_intrinsics.h spu2vmx.h vec_types.h si2vmx.h"
extra_headers="${extra_headers} amo.h"
case x$with_cpu in
xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456789]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456789]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500|xfuture)
cpu_is_64bit=yes
;;
esac
......
......@@ -624,11 +624,10 @@ bool aarch64_handle_option (struct gcc_options *, struct gcc_options *,
const struct cl_decoded_option *, location_t);
const char *aarch64_rewrite_selected_cpu (const char *name);
enum aarch64_parse_opt_result aarch64_parse_extension (const char *,
unsigned long *,
uint64_t *,
std::string *);
void aarch64_get_all_extension_candidates (auto_vec<const char *> *candidates);
std::string aarch64_get_extension_string_for_isa_flags (unsigned long,
unsigned long);
std::string aarch64_get_extension_string_for_isa_flags (uint64_t, uint64_t);
/* Defined in aarch64-d.c */
extern void aarch64_d_target_versions (void);
......
......@@ -853,7 +853,10 @@ main (int argc, char *argv[])
unsigned int upper = (return_value & ~0xffff) >> 16;
if (upper == 0xcafe)
printf ("Kernel exit value was never set\n");
{
printf ("Kernel exit value was never set\n");
return_value = 0xff;
}
else if (upper == 0xffff)
; /* Set by exit. */
else if (upper == 0)
......
......@@ -2824,9 +2824,9 @@ gcn_expand_prologue ()
emit_move_insn (fp_lo, gen_rtx_REG (SImode, 0));
emit_insn (gen_andsi3_scc (fp_hi, gen_rtx_REG (SImode, 1),
gen_int_mode (0xffff, SImode)));
emit_insn (gen_addsi3_scc (fp_lo, fp_lo, wave_offset));
emit_insn (gen_addcsi3_scalar_zero (fp_hi, fp_hi,
gen_rtx_REG (BImode, SCC_REG)));
rtx scc = gen_rtx_REG (BImode, SCC_REG);
emit_insn (gen_addsi3_scalar_carry (fp_lo, fp_lo, wave_offset, scc));
emit_insn (gen_addcsi3_scalar_zero (fp_hi, fp_hi, scc));
if (sp_adjust > 0)
emit_insn (gen_adddi3_scc (sp, fp, gen_int_mode (sp_adjust, DImode)));
......
......@@ -784,10 +784,10 @@
if (cfun && cfun->machine && cfun->machine->normal_function)
return "s_setpc_b64\ts[18:19]";
else
return "s_dcache_wb\;s_endpgm";
return "s_waitcnt\tlgkmcnt(0)\;s_dcache_wb\;s_endpgm";
}
[(set_attr "type" "sop1")
(set_attr "length" "8")])
(set_attr "length" "12")])
(define_expand "call"
[(parallel [(call (match_operand 0 "")
......
......@@ -113,6 +113,7 @@
#define bit_RDPID (1 << 22)
#define bit_MOVDIRI (1 << 27)
#define bit_MOVDIR64B (1 << 28)
#define bit_ENQCMD (1 << 29)
#define bit_CLDEMOTE (1 << 25)
/* %edx */
......
......@@ -132,7 +132,8 @@ extern int darwin_emit_branch_islands;
#define CC1_SPEC "%(cc1_cpu) \
%{!mkernel:%{!static:%{!mdynamic-no-pic:-fPIC}}} \
%{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }} \
%{mx32:%eDarwin is not an mx32 platform}" \
%{mx32:%eDarwin is not an mx32 platform} \
%{mfentry*:%eDarwin does not support -mfentry or associated options}" \
DARWIN_CC1_SPEC
#undef ASM_SPEC
......
......@@ -424,6 +424,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
unsigned int has_avx512vnni = 0, has_vaes = 0;
unsigned int has_vpclmulqdq = 0;
unsigned int has_movdiri = 0, has_movdir64b = 0;
unsigned int has_enqcmd = 0;
unsigned int has_waitpkg = 0;
unsigned int has_cldemote = 0;
unsigned int has_avx512bf16 = 0;
......@@ -526,6 +527,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
has_avx512bitalg = ecx & bit_AVX512BITALG;
has_movdiri = ecx & bit_MOVDIRI;
has_movdir64b = ecx & bit_MOVDIR64B;
has_enqcmd = ecx & bit_ENQCMD;
has_cldemote = ecx & bit_CLDEMOTE;
has_avx5124vnniw = edx & bit_AVX5124VNNIW;
......@@ -1144,6 +1146,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
const char *avx512bitalg = has_avx512bitalg ? " -mavx512bitalg" : " -mno-avx512bitalg";
const char *movdiri = has_movdiri ? " -mmovdiri" : " -mno-movdiri";
const char *movdir64b = has_movdir64b ? " -mmovdir64b" : " -mno-movdir64b";
const char *enqcmd = has_enqcmd ? " -menqcmd" : " -mno-enqcmd";
const char *waitpkg = has_waitpkg ? " -mwaitpkg" : " -mno-waitpkg";
const char *cldemote = has_cldemote ? " -mcldemote" : " -mno-cldemote";
const char *ptwrite = has_ptwrite ? " -mptwrite" : " -mno-ptwrite";
......@@ -1162,7 +1165,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
clwb, mwaitx, clzero, pku, rdpid, gfni, shstk,
avx512vbmi2, avx512vnni, vaes, vpclmulqdq,
avx512bitalg, movdiri, movdir64b, waitpkg, cldemote,
ptwrite, avx512bf16,
ptwrite, avx512bf16, enqcmd,
NULL);
}
......
/* Copyright (C) 2019 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#if !defined _IMMINTRIN_H_INCLUDED
# error "Never use <enqcmdntrin.h> directly; include <x86intrin.h> instead."
#endif
#ifndef _ENQCMDNTRIN_H_INCLUDED
#define _ENQCMDNTRIN_H_INCLUDED
#ifndef __ENQCMD__
#pragma GCC push_options
#pragma GCC target ("enqcmd")
#define __DISABLE_ENQCMD__
#endif /* __ENQCMD__ */
extern __inline int
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_enqcmd (void