diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2025-07-23 00:19:10 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2025-09-11 11:10:49 +0200 |
commit | 3a3854f3ea8ffcce624f064a137bacde03ab5efb (patch) | |
tree | c3906b2ab9b35e847614006371ba101b6d066cee /libjava | |
parent | 571088f4d662d807eaa09bd4b03570e0ebb50495 (diff) | |
download | gcc-3a3854f3ea8ffcce624f064a137bacde03ab5efb.zip gcc-3a3854f3ea8ffcce624f064a137bacde03ab5efb.tar.gz gcc-3a3854f3ea8ffcce624f064a137bacde03ab5efb.tar.bz2 |
ada: Implement overflow checking for unsigned types
The implementation is essentially mirrored from the one for signed types.
gcc/ada/ChangeLog:
* gcc-interface/gigi.h (standard_datatypes): Add ADT_uns_mulv64_decl
and ADT_uns_mulv128_decl.
(uns_mulv64_decl): New macro.
(uns_mulv128_decl): Likewise.
* gcc-interface/trans.cc (gigi): Create the uns_mulv64_decl and
uns_mulv128_decl declarations.
(gnat_to_gnu) <N_Op_Add>: Perform an overflow check for unsigned
integer addition, subtraction and multiplication if required.
<N_Op_Minus>: Perform an overflow check for unsigned integer
negation if required.
(build_unary_op_trapv): Add support for unsigned types.
(build_binary_op_trapv): Likewise.
<MINUS_EXPR>: Perform the check if the LHS is zero in the signed
case as well.
Diffstat (limited to 'libjava')
0 files changed, 0 insertions, 0 deletions