From: Eric Botcazou Date: Mon, 22 Oct 2018 10:43:20 +0000 (+0000) Subject: trans.c (Pragma_to_gnu): Use a simple memory constraint in all cases. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9e4cacfab2d836d4dabc0b2aac095e635288bd27;p=gcc.git trans.c (Pragma_to_gnu): Use a simple memory constraint in all cases. * gcc-interface/trans.c (Pragma_to_gnu) : Use a simple memory constraint in all cases. * gcc-interface/lang-specs.h: Bump copyright year. From-SVN: r265378 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0d134237912..c002cdb1a1e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2018-10-22 Eric Botcazou + + * gcc-interface/trans.c (Pragma_to_gnu) : Use + a simple memory constraint in all cases. + + * gcc-interface/lang-specs.h: Bump copyright year. + 2018-10-17 David Malcolm * gcc-interface/Make-lang.in (selftest-ada): New. diff --git a/gcc/ada/gcc-interface/lang-specs.h b/gcc/ada/gcc-interface/lang-specs.h index c7bf32c0390..374fc1e9527 100644 --- a/gcc/ada/gcc-interface/lang-specs.h +++ b/gcc/ada/gcc-interface/lang-specs.h @@ -6,7 +6,7 @@ * * * 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- * diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 6757c2fedc0..ce2d43f989e 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -1285,32 +1285,18 @@ Pragma_to_gnu (Node_Id gnat_node) { 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 (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); @@ -1320,8 +1306,8 @@ Pragma_to_gnu (Node_Id gnat_node) 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);