+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>
* gcc-interface/Make-lang.in (selftest-ada): New.
* *
* 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 *
* terms of the GNU General Public License as published by the Free Soft- *
{
Node_Id gnat_expr = Expression (gnat_temp);
tree gnu_expr = gnat_to_gnu (gnat_expr);
- int use_address;
- machine_mode mode;
- scalar_int_mode int_mode;
tree asm_constraint = NULL_TREE;
#ifdef ASM_COMMENT_START
char *comment;
#endif
-
- if (TREE_CODE (gnu_expr) == UNCONSTRAINED_ARRAY_REF)
- 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);
+ gnu_expr = maybe_unconstrained_array (gnu_expr);
+ gnat_mark_addressable (gnu_expr);
#ifdef ASM_COMMENT_START
comment = concat (ASM_COMMENT_START,
" inspection point: ",
Get_Name_String (Chars (gnat_expr)),
- use_address ? " address" : "",
- " is in %0",
+ " is at %0",
NULL);
asm_constraint = build_string (strlen (comment), comment);
free (comment);
NULL_TREE,
tree_cons
(build_tree_list (NULL_TREE,
- build_string (1, "g")),
- gnu_expr, NULL_TREE),
+ build_string (1, "m")),
+ gnu_expr, NULL_TREE),
NULL_TREE, NULL_TREE);
ASM_VOLATILE_P (gnu_expr) = 1;
set_expr_location_from_node (gnu_expr, gnat_node);