]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 2 Oct 2012 12:16:17 +0000 (14:16 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 2 Oct 2012 12:16:17 +0000 (14:16 +0200)
2012-10-02  Eric Botcazou  <ebotcazou@adacore.com>

* types.h: Minor cosmetic fix.

2012-10-02  Robert Dewar  <dewar@adacore.com>

* sinfo.ads: Remove refs of N_Conditional_Expression and
N_Parameterized_Expression.

2012-10-02  Thomas Quinot  <quinot@adacore.com>

* exp_aggr.adb (Get_Component_Val): Rewrite code that computes
justification of bits in enclosing word in an attempt to make
it clearer.

From-SVN: r191973

gcc/ada/ChangeLog
gcc/ada/exp_aggr.adb
gcc/ada/sinfo.ads
gcc/ada/types.h

index cddd55b7801f5919ac42e6a94aad8de6d07c5f7d..dd4f91a57c576d5a6637c2ec92bb475979e5bb27 100644 (file)
@@ -1,3 +1,7 @@
+2012-10-02  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * types.h: Minor cosmetic fix.
+
 2012-10-02  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interfaces/decl.c (elaborate_expression_1): Use the variable for
@@ -6,6 +10,17 @@
        * gcc-interface/trans.c (gigi): Fix formatting.
        (build_return_expr): Apply the NRV optimization only for BLKmode.
 
+2012-10-02  Robert Dewar  <dewar@adacore.com>
+
+       * sinfo.ads: Remove refs of N_Conditional_Expression and
+       N_Parameterized_Expression.
+
+2012-10-02  Thomas Quinot  <quinot@adacore.com>
+
+       * exp_aggr.adb (Get_Component_Val): Rewrite code that computes
+       justification of bits in enclosing word in an attempt to make
+       it clearer.
+
 2012-10-02  Robert Dewar  <dewar@adacore.com>
 
        * par_sco.adb, sem_ch3.adb, layout.adb, exp_ch7.adb, exp_imgv.adb,
index 7141a30cd532316758b5ed2e8c8c7312fa84a4dc..1d42bf89948aeb89eb1d5af2605d84545b2c3896 100644 (file)
@@ -6167,21 +6167,30 @@ package body Exp_Aggr is
             Expr : Node_Id;
             --  Next expression from positional parameters of aggregate
 
+            Left_Justified : Boolean;
+            --  Set True if we are filling the high order bits of the target
+            --  value (i.e. the value is left justified).
+
          begin
             --  For little endian, we fill up the low order bits of the target
             --  value. For big endian we fill up the high order bits of the
             --  target value (which is a left justified modular value).
 
-            --  Above comment needs extending for the code below, which is by
-            --  the way incomprehensible, I have no idea what a xor b xor c
-            --  means, and it hurts my brain to try to figure it out???
-            --  Let's introduce a new variable, perhaps Effectively_Big_Endian
-            --  and compute it with clearer code ???
+            Left_Justified := Bytes_Big_Endian;
 
-            if Bytes_Big_Endian
-              xor Debug_Flag_8
-              xor Reverse_Storage_Order (Base_Type (Typ))
-            then
+            --  Switch justification if using -gnatd8
+
+            if Debug_Flag_8 then
+               Left_Justified := not Left_Justified;
+            end if;
+
+            --  Switch justfification if reverse storage order
+
+            if Reverse_Storage_Order (Base_Type (Typ)) then
+               Left_Justified := not Left_Justified;
+            end if;
+
+            if Left_Justified then
                Shift := Csiz * (Len - 1);
                Incr  := -Csiz;
             else
index a0f5b52a65f52539835e58705d4f3996e3be66d0..c2c19350a0999459d6ce8cfe7ac0bfb0a15d5b4c 100644 (file)
@@ -12439,10 +12439,4 @@ package Sinfo is
    --  Rename N_Return_Statement to be N_Simple_Return_Statement. Clients
    --  should refer to N_Simple_Return_Statement.
 
-   N_Parameterized_Expression : constant Node_Kind := N_Expression_Function;
-   --  Old name for expression function (used during Ada 2012 transition)
-
-   N_Conditional_Expression : Node_Kind renames N_If_Expression;
-   --  Old name for if expression (used during Ada 2012 transition)
-
 end Sinfo;
index bd1ef6219560030a59de6632b51eefea6561996d..a0f28910d1139931df1ed4d2c6ae34a67cd4ea63 100644 (file)
@@ -384,4 +384,3 @@ typedef Int Mechanism_Type;
 #define SE_Object_Too_Large                34
 
 #define LAST_REASON_CODE                   34
-