8209786: JDK12 fails to build on s390x with gcc 7.3

Reviewed-by: ihse, goetz
This commit is contained in:
Andrew Leonard 2018-09-07 11:24:59 +02:00
parent b66c67675d
commit 660f6b448b
2 changed files with 12 additions and 12 deletions

View File

@ -68,7 +68,7 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
CFLAGS_linux_ppc64le := -ffp-contract=off, \
CFLAGS_linux_s390x := -ffp-contract=off, \
CFLAGS_linux_aarch64 := -ffp-contract=off, \
DISABLED_WARNINGS_gcc := sign-compare misleading-indentation, \
DISABLED_WARNINGS_gcc := sign-compare misleading-indentation array-bounds, \
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
ARFLAGS := $(ARFLAGS), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -259,18 +259,18 @@ mlib_status mlib_ImageLookUp_Bit_U8_1(const mlib_u8 *src,
}
#ifdef _LITTLE_ENDIAN
emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8);
emask = (~(mlib_u32)0) >> ((4 - (size - i)) * 8);
#else
emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8);
emask = (~(mlib_u32)0) << ((4 - (size - i)) * 8);
#endif /* _LITTLE_ENDIAN */
((mlib_u32*)da)[0] = (val1 & emask) | (((mlib_u32*)da)[0] &~ emask);
#else /* _NO_LONGLONG */
#ifdef _LITTLE_ENDIAN
mlib_u64 emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8);
mlib_u64 emask = (~(mlib_u64)0) >> ((8 - (size - i)) * 8);
#else
mlib_u64 emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8);
mlib_u64 emask = (~(mlib_u64)0) << ((8 - (size - i)) * 8);
#endif /* _LITTLE_ENDIAN */
((mlib_u64*)da)[0] = (((mlib_u64*)dd_array)[sa[0]] & emask) | (((mlib_u64*)da)[0] &~ emask);
@ -395,9 +395,9 @@ mlib_status mlib_ImageLookUp_Bit_U8_2(const mlib_u8 *src,
}
#ifdef _LITTLE_ENDIAN
emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8);
emask = (~(mlib_u32)0) >> ((4 - (size - i)) * 8);
#else
emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8);
emask = (~(mlib_u32)0) << ((4 - (size - i)) * 8);
#endif /* _LITTLE_ENDIAN */
((mlib_u32*)da)[0] = (dd1 & emask) | (((mlib_u32*)da)[0] &~ emask);
@ -413,9 +413,9 @@ mlib_status mlib_ImageLookUp_Bit_U8_2(const mlib_u8 *src,
}
#ifdef _LITTLE_ENDIAN
emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8);
emask = (~(mlib_u64)0) >> ((8 - (size - i)) * 8);
#else
emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8);
emask = (~(mlib_u64)0) << ((8 - (size - i)) * 8);
#endif /* _LITTLE_ENDIAN */
((mlib_u64*)da)[0] = (dd & emask) | (((mlib_u64*)da)[0] &~ emask);
@ -565,9 +565,9 @@ mlib_status mlib_ImageLookUp_Bit_U8_3(const mlib_u8 *src,
}
#ifdef _LITTLE_ENDIAN
emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8);
emask = (~(mlib_u32)0) >> ((4 - (size - i)) * 8);
#else
emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8);
emask = (~(mlib_u32)0) << ((4 - (size - i)) * 8);
#endif /* _LITTLE_ENDIAN */
da[0] = (dd & emask) | (da[0] &~ emask);
}