diff options
Diffstat (limited to 'gcc/ada/exp_pakd.adb')
-rw-r--r-- | gcc/ada/exp_pakd.adb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ada/exp_pakd.adb b/gcc/ada/exp_pakd.adb index be4669ce9b8..bd8a69771a4 100644 --- a/gcc/ada/exp_pakd.adb +++ b/gcc/ada/exp_pakd.adb @@ -1381,6 +1381,19 @@ package body Exp_Pakd is Analyze_And_Resolve (Rhs, Ctyp); end if; + -- For the AAMP target, indexing of certain packed array is passed + -- through to the back end without expansion, because the expansion + -- results in very inefficient code on that target. This allows the + -- GNAAMP back end to generate specialized macros that support more + -- efficient indexing of packed arrays with components having sizes + -- that are small powers of two. + + if AAMP_On_Target + and then (Csiz = 1 or else Csiz = 2 or else Csiz = 4) + then + return; + end if; + -- Case of component size 1,2,4 or any component size for the modular -- case. These are the cases for which we can inline the code. @@ -1933,6 +1946,19 @@ package body Exp_Pakd is Ctyp := Component_Type (Atyp); Csiz := UI_To_Int (Component_Size (Atyp)); + -- For the AAMP target, indexing of certain packed array is passed + -- through to the back end without expansion, because the expansion + -- results in very inefficient code on that target. This allows the + -- GNAAMP back end to generate specialized macros that support more + -- efficient indexing of packed arrays with components having sizes + -- that are small powers of two. + + if AAMP_On_Target + and then (Csiz = 1 or else Csiz = 2 or else Csiz = 4) + then + return; + end if; + -- Case of component size 1,2,4 or any component size for the modular -- case. These are the cases for which we can inline the code. |