This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Avoid explicit use of machine modes (4/n) ada/trans.c


Using REAL_ARITHMETIC instead of REAL_VALUE_ATOF is (marginally) more
efficient and avoids the need to refer to DFmode.  It is not
necessarily the case that "double" has DFmode.

zw

ada:
        * trans.c (gigi): Use REAL_ARITHMETIC, not REAL_VALUE_ATOF, to
        initialize dconstp5 and dconstmp5.

===================================================================
Index: ada/trans.c
--- ada/trans.c	28 Sep 2003 19:09:52 -0000	1.33
+++ ada/trans.c	29 Sep 2003 22:11:52 -0000
@@ -196,8 +196,8 @@ gigi (gnat_root, max_gnat_node, number_n
 
   gnu_except_ptr_stack = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE);
 
-  dconstp5 = REAL_VALUE_ATOF ("0.5", DFmode);
-  dconstmp5 = REAL_VALUE_ATOF ("-0.5", DFmode);
+  REAL_ARITHMETIC (dconstp5, RDIV_EXPR, dconst1, dconst2);
+  REAL_ARITHMETIC (dconstmp5, RDIV_EXPR, dconstm1, dconst2);
 
   gnu_standard_long_long_float
     = gnat_to_gnu_entity (Base_Type (standard_long_long_float), NULL_TREE, 0);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]