trans.c (Pragma_to_gnu): Use a simple memory constraint in all cases.
* gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Inspection_Point>: Use a simple memory constraint in all cases. * gcc-interface/lang-specs.h: Bump copyright year. From-SVN: r265378
This commit is contained in:
parent
bbc960279d
commit
9e4cacfab2
@ -1,3 +1,10 @@
|
|||||||
|
2018-10-22 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Inspection_Point>: Use
|
||||||
|
a simple memory constraint in all cases.
|
||||||
|
|
||||||
|
* gcc-interface/lang-specs.h: Bump copyright year.
|
||||||
|
|
||||||
2018-10-17 David Malcolm <dmalcolm@redhat.com>
|
2018-10-17 David Malcolm <dmalcolm@redhat.com>
|
||||||
|
|
||||||
* gcc-interface/Make-lang.in (selftest-ada): New.
|
* gcc-interface/Make-lang.in (selftest-ada): New.
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* *
|
* *
|
||||||
* C Header File *
|
* C Header File *
|
||||||
* *
|
* *
|
||||||
* Copyright (C) 1992-2015, Free Software Foundation, Inc. *
|
* Copyright (C) 1992-2018, Free Software Foundation, Inc. *
|
||||||
* *
|
* *
|
||||||
* GNAT is free software; you can redistribute it and/or modify it under *
|
* 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- *
|
* terms of the GNU General Public License as published by the Free Soft- *
|
||||||
|
@ -1285,32 +1285,18 @@ Pragma_to_gnu (Node_Id gnat_node)
|
|||||||
{
|
{
|
||||||
Node_Id gnat_expr = Expression (gnat_temp);
|
Node_Id gnat_expr = Expression (gnat_temp);
|
||||||
tree gnu_expr = gnat_to_gnu (gnat_expr);
|
tree gnu_expr = gnat_to_gnu (gnat_expr);
|
||||||
int use_address;
|
|
||||||
machine_mode mode;
|
|
||||||
scalar_int_mode int_mode;
|
|
||||||
tree asm_constraint = NULL_TREE;
|
tree asm_constraint = NULL_TREE;
|
||||||
#ifdef ASM_COMMENT_START
|
#ifdef ASM_COMMENT_START
|
||||||
char *comment;
|
char *comment;
|
||||||
#endif
|
#endif
|
||||||
|
gnu_expr = maybe_unconstrained_array (gnu_expr);
|
||||||
if (TREE_CODE (gnu_expr) == UNCONSTRAINED_ARRAY_REF)
|
gnat_mark_addressable (gnu_expr);
|
||||||
gnu_expr = TREE_OPERAND (gnu_expr, 0);
|
|
||||||
|
|
||||||
/* Use the value only if it fits into a normal register,
|
|
||||||
otherwise use the address. */
|
|
||||||
mode = TYPE_MODE (TREE_TYPE (gnu_expr));
|
|
||||||
use_address = (!is_a <scalar_int_mode> (mode, &int_mode)
|
|
||||||
|| GET_MODE_SIZE (int_mode) > UNITS_PER_WORD);
|
|
||||||
|
|
||||||
if (use_address)
|
|
||||||
gnu_expr = build_unary_op (ADDR_EXPR, NULL_TREE, gnu_expr);
|
|
||||||
|
|
||||||
#ifdef ASM_COMMENT_START
|
#ifdef ASM_COMMENT_START
|
||||||
comment = concat (ASM_COMMENT_START,
|
comment = concat (ASM_COMMENT_START,
|
||||||
" inspection point: ",
|
" inspection point: ",
|
||||||
Get_Name_String (Chars (gnat_expr)),
|
Get_Name_String (Chars (gnat_expr)),
|
||||||
use_address ? " address" : "",
|
" is at %0",
|
||||||
" is in %0",
|
|
||||||
NULL);
|
NULL);
|
||||||
asm_constraint = build_string (strlen (comment), comment);
|
asm_constraint = build_string (strlen (comment), comment);
|
||||||
free (comment);
|
free (comment);
|
||||||
@ -1320,8 +1306,8 @@ Pragma_to_gnu (Node_Id gnat_node)
|
|||||||
NULL_TREE,
|
NULL_TREE,
|
||||||
tree_cons
|
tree_cons
|
||||||
(build_tree_list (NULL_TREE,
|
(build_tree_list (NULL_TREE,
|
||||||
build_string (1, "g")),
|
build_string (1, "m")),
|
||||||
gnu_expr, NULL_TREE),
|
gnu_expr, NULL_TREE),
|
||||||
NULL_TREE, NULL_TREE);
|
NULL_TREE, NULL_TREE);
|
||||||
ASM_VOLATILE_P (gnu_expr) = 1;
|
ASM_VOLATILE_P (gnu_expr) = 1;
|
||||||
set_expr_location_from_node (gnu_expr, gnat_node);
|
set_expr_location_from_node (gnu_expr, gnat_node);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user