diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-06-17 09:54:47 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-07-02 15:20:34 +0200 |
commit | 772fcf4769a4d4e5546039c0174662df1bc86fa4 (patch) | |
tree | 5f8b0ea81fff0f8d098bc0aa940342e6dffe9db0 /gcc/dwarf2ctf.cc | |
parent | 487c9df60263baf92c121b986ce19259a8c769d1 (diff) | |
download | gcc-772fcf4769a4d4e5546039c0174662df1bc86fa4.zip gcc-772fcf4769a4d4e5546039c0174662df1bc86fa4.tar.gz gcc-772fcf4769a4d4e5546039c0174662df1bc86fa4.tar.bz2 |
ada: Call memcmp instead of Compare_Array_Unsigned_8 and...
... implement support for ordering comparisons of discrete array types.
This extends the Support_Composite_Compare_On_Target feature to ordering
comparisons of discrete array types as specified by RM 4.5.2(26/3), when
the component type is a byte (unsigned).
Implement support for ordering comparisons of discrete array types
with a two-pronged approach: for types with a size known at compile time,
this lets the gimplifier generate the call to memcmp (or else an optimize
version of it); otherwise, this directly generates the call to memcmp.
gcc/ada/
* exp_ch4.adb (Expand_Array_Comparison): Remove the obsolete byte
addressibility test. If Support_Composite_Compare_On_Target is true,
immediately return for a component size of 8, an unsigned component
type and aligned operands. Disable when Unnest_Subprogram_Mode is
true (for LLVM).
(Expand_N_Op_Eq): Adjust comment.
* targparm.ads (Support_Composite_Compare_On_Target): Replace bit by
byte in description and document support for ordering comparisons.
* gcc-interface/utils2.cc (compare_arrays): Rename into...
(compare_arrays_for_equality): ...this. Remove redundant lines.
(compare_arrays_for_ordering): New function.
(build_binary_op) <comparisons>: Call compare_arrays_for_ordering
to implement ordering comparisons for arrays.
Diffstat (limited to 'gcc/dwarf2ctf.cc')
0 files changed, 0 insertions, 0 deletions