From a8ae23920f9c954ed66bd92ddbdbb1b8486b950f Mon Sep 17 00:00:00 2001 From: Stefan Kanthak Date: Sun, 29 Nov 2020 18:05:46 -0700 Subject: [PATCH] fixed _bswapsi2 function libgcc * libgcc2.c (bswapsi2): Make constants unsigned. --- libgcc/libgcc2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c index 1921d80f612..61de3b42e1d 100644 --- a/libgcc/libgcc2.c +++ b/libgcc/libgcc2.c @@ -468,10 +468,10 @@ __ashrdi3 (DWtype u, shift_count_type b) SItype __bswapsi2 (SItype u) { - return ((((u) & 0xff000000) >> 24) - | (((u) & 0x00ff0000) >> 8) - | (((u) & 0x0000ff00) << 8) - | (((u) & 0x000000ff) << 24)); + return ((((u) & 0xff000000u) >> 24) + | (((u) & 0x00ff0000u) >> 8) + | (((u) & 0x0000ff00u) << 8) + | (((u) & 0x000000ffu) << 24)); } #endif #ifdef L_bswapdi2