aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcc2.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-01-12 10:10:20 +0100
committerJakub Jelinek <jakub@redhat.com>2024-01-12 10:10:20 +0100
commit6dece9913f459f46c86d383e0da2ea544ce73f63 (patch)
tree8e04bace0c9162ea72c9bdfeed1a24a85c23556a /libgcc/libgcc2.h
parent160799b366c33246ca16b84020ec49c3feabb0a3 (diff)
downloadgcc-6dece9913f459f46c86d383e0da2ea544ce73f63.zip
gcc-6dece9913f459f46c86d383e0da2ea544ce73f63.tar.gz
gcc-6dece9913f459f46c86d383e0da2ea544ce73f63.tar.bz2
libgcc: Use may_alias attribute in bitint handlers
As discussed on IRC, the following patch uses may_alias attribute, so that on targets like aarch64 where abi_limb_mode != limb_mode the library accesses the limbs (half limbs of the ABI) in the arrays with conservative alias set. 2024-01-12 Jakub Jelinek <jakub@redhat.com> * libgcc2.h (UBILtype): New typedef with may_alias attribute. (__mulbitint3, __divmodbitint4): Use UBILtype * instead of UWtype * and const UBILtype * instead of const UWtype *. * libgcc2.c (bitint_reduce_prec, bitint_mul_1, bitint_addmul_1, __mulbitint3, bitint_negate, bitint_submul_1, __divmodbitint4): Likewise. * soft-fp/bitint.h (UBILtype): Change define into a typedef with may_alias attribute.
Diffstat (limited to 'libgcc/libgcc2.h')
-rw-r--r--libgcc/libgcc2.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h
index c4ee965..5050456 100644
--- a/libgcc/libgcc2.h
+++ b/libgcc/libgcc2.h
@@ -402,10 +402,12 @@ extern UDWtype __udivmoddi4 (UDWtype, UDWtype, UDWtype *);
#if (defined(__BITINT_MAXWIDTH__) \
&& (defined(L_mulbitint3) || defined(L_divmodbitint4)))
/* _BitInt support. */
-extern void __mulbitint3 (UWtype *, SItype, const UWtype *, SItype,
- const UWtype *, SItype);
-extern void __divmodbitint4 (UWtype *, SItype, UWtype *, SItype,
- const UWtype *, SItype, const UWtype *, SItype);
+typedef UWtype __attribute__((__may_alias__)) UBILtype;
+extern void __mulbitint3 (UBILtype *, SItype, const UBILtype *, SItype,
+ const UBILtype *, SItype);
+extern void __divmodbitint4 (UBILtype *, SItype, UBILtype *, SItype,
+ const UBILtype *, SItype, const UBILtype *,
+ SItype);
#endif
/* __negdi2 is static inline when building other libgcc2 portions. */