From f2d9f95e9ccac1376aee73345b8b4a00e803d67d Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 12 Sep 2020 12:59:09 +0200 Subject: Add preliminary support for 128-bit integer types This is only the gigi part, in preparation for the bulk of the implementation. gcc/ada/ChangeLog: * fe.h: Fix pilot error in previous change. * gcc-interface/gigi.h (enum standard_datatypes): Add ADT_mulv128_decl. (mulv128_decl): New macro. (get_target_long_long_long_size): Declare. * gcc-interface/decl.c (gnat_to_gnu_entity): Use a maximum size of 128 bits for discrete types if Enable_128bit_Types is true. * gcc-interface/targtyps.c: Include target.h. (get_target_long_long_long_size): New function. * gcc-interface/trans.c (gigi): Initialize mulv128_decl if need be. (build_binary_op_trapv): Call it for 128-bit multiplication. * gcc-interface/utils.c (make_type_from_size): Enforce a maximum size of 128 bits if Enable_128bit_Types is true. --- gcc/ada/gcc-interface/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ada/gcc-interface/utils.c') diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 3065fcb..048a0cf 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -1343,7 +1343,7 @@ make_type_from_size (tree type, tree size_tree, bool for_biased) not already have the proper size and the size is not too large. */ if (BIT_PACKED_ARRAY_TYPE_P (type) || (TYPE_PRECISION (type) == size && biased_p == for_biased) - || size > LONG_LONG_TYPE_SIZE) + || size > (Enable_128bit_Types ? 128 : LONG_LONG_TYPE_SIZE)) break; biased_p |= for_biased; -- cgit v1.1