The previous commit:
commit
eb82a294573d15c1be663673d55b559a82ca29d3
Author: Julian Seward <jseward@acm.org>
Date: Tue Nov 10 21:10:48 2020 +0100
Add a missing ifdef, whose absence caused build breakage on non-POWER targets.
fixed the compile issue in conv_f16_to_double() where non-Power platforms
do not support the power xscvhpdp assembly instructions. The instruction
is supported by ISA 3.0 platforms. Older Power platforms still fail to
compile with the assembly instruction. This patch fixes the if def for
power systems that do not support ISA 3.0.
-fno-strict-aliasing \
-fno-builtin
+# Power ISA flag for use by guest_ppc_helpers.c
+if HAS_XSCVHPDP
+ISA_3_0_BUILD_FLAG = -DHAS_XSCVHPDP
+else
+ISA_3_0_BUILD_FLAG =
+endif
+
if COMPILER_IS_CLANG
AM_CFLAGS_BASE += -Wno-cast-align -Wno-self-assign \
-Wno-tautological-compare
AM_CCASFLAGS_PPC64BE_LINUX = @FLAG_M64@ -g
AM_FLAG_M3264_PPC64LE_LINUX = @FLAG_M64@
-AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE)
+AM_CFLAGS_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) $(ISA_3_0_BUILD_FLAG)
AM_CFLAGS_PSO_PPC64LE_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) $(AM_CFLAGS_PSO_BASE)
AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g
static Double conv_f16_to_double( ULong input )
{
-# if defined(__powerpc__)
+# if defined (HAS_XSCVHPDP)
// This all seems to be very alignment sensitive??
__attribute__ ((aligned (64))) ULong src;
__attribute__ ((aligned (64))) Double result;
AC_MSG_RESULT([no])
])
+# xscvhpdp checking
+AC_MSG_CHECKING([that assembler knows xscvhpdp ])
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+]], [[
+ __asm__ __volatile__("xscvhpdp 1,2 ");
+]])], [
+ac_asm_have_xscvhpdp=yes
+AC_MSG_RESULT([yes])
+], [
+ac_asm_have_xscvhpdp=no
+AC_MSG_RESULT([no])
+])
+
# isa 3.01 checking
AC_MSG_CHECKING([that assembler knows ISA 3.1 ])
AM_CONDITIONAL(HAS_ISA_3_00, [test x$ac_asm_have_isa_3_00 = xyes \
-a x$HWCAP_HAS_ISA_3_00 = xyes])
+AM_CONDITIONAL(HAS_XSCVHPDP, [test x$ac_asm_have_xscvhpdp = xyes])
+
AM_CONDITIONAL(HAS_ISA_3_1, [test x$ac_asm_have_isa_3_1 = xyes \
-a x$HWCAP_HAS_ISA_3_1 = xyes])