]], [[
__asm__ __volatile__("cnttzw 1,2 ");
]])], [
+# guest_ppc_helpers.c needs the HAS_ISA_3_OO to enable copy, paste,
+# cpabort support
+safe_CFLAGS=$CFLAGS
+CFLAGS="-DHAS_ISA_3_00"
ac_asm_have_isa_3_00=yes
AC_MSG_RESULT([yes])
], [
ac_asm_have_isa_3_00=no
AC_MSG_RESULT([no])
])
+CFLAGS=$safe_CFLAGS
# xscvhpdp checking
AC_MSG_CHECKING([that assembler knows xscvhpdp ])
# isa 3.01 checking
AC_MSG_CHECKING([that assembler knows ISA 3.1 ])
-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
]], [[
__asm__ __volatile__("brh 1,2 ");
allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
+scv_test_SOURCES = scv_test.c
+test_copy_paste_SOURCES = test_copy_paste.c
+test_mod_instructions_SOURCES = test_mod_instructions.c
+test_isa_3_0_SOURCES = test_isa_3_0.c
test_isa_3_1_XT_SOURCES = test_isa_3_1_XT.c test_isa_3_1_common.c
test_isa_3_1_RT_SOURCES = test_isa_3_1_RT.c test_isa_3_1_common.c
test_isa_3_1_VRT_SOURCES = test_isa_3_1_VRT.c test_isa_3_1_common.c
test_isa_3_1_Misc_SOURCES = test_isa_3_1_Misc.c test_isa_3_1_common.c
test_isa_3_1_AT_SOURCES = test_isa_3_1_AT.c test_isa_3_1_common.c
+test_darn_inst_SOURCES = test_darn_inst.c
if HAS_ALTIVEC
BUILD_FLAG_ALTIVEC = -maltivec
endif
if HAS_DFP
-BUILD_FLAGS_DFP = -mhard-dfp -mcpu=power6
+# The DFP test uses the Power7 dcffix instruction.
+BUILD_FLAGS_DFP = -mhard-dfp -mcpu=power7
DFP_FLAG = -DHAS_DFP
else
BUILD_FLAGS_DFP =
test_isa_3_0_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(HTM_FLAG) $(ISA_3_00_FLAG) \
@FLAG_M64@ $(BUILD_FLAGS_ISA_3_00)
+scv_test_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(HTM_FLAG) $(ISA_3_00_FLAG) \
+ @FLAG_M64@ $(BUILD_FLAGS_ISA_3_00)
+
+test_mod_instructions_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(HTM_FLAG) $(ISA_3_00_FLAG) \
+ @FLAG_M64@ $(BUILD_FLAGS_ISA_3_00)
+
test_darn_inst_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(HTM_FLAG) $(ISA_3_00_FLAG) \
@FLAG_M64@ $(BUILD_FLAGS_ISA_3_00)
subnormal_test_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(VSX_FLAG) $(ISA_2_06_FLAG) \
@FLAG_M64@ $(ALTIVEC_FLAG) $(BUILD_FLAG_VSX) $(BUILD_FLAGS_ISA_2_06)
-test_copy_paste_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(VSX_FLAG) $(ISA_3_1_FLAG) \
- @FLAG_M64@ $(ALTIVEC_FLAG) $(BUILD_FLAG_VSX) $(BUILD_FLAGS_ISA_3_1)
+test_copy_paste_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(HTM_FLAG) $(ISA_3_00_FLAG) \
+ @FLAG_M64@ $(BUILD_FLAGS_ISA_3_00)
test_isa_2_06_part3_LDADD = -lm
test_dfp1_LDADD = -lm
#include <stdio.h>
+#ifdef HAS_ISA_3_00
long test_modsd( long srcA, long srcB)
{
long dst;
return dst;
}
+#endif
int main()
{
+#ifdef HAS_ISA_3_00
int srcA_si, srcB_si, dst_si;
unsigned int srcA_ui, srcB_ui, dst_ui;
long srcA_sl, srcB_sl, dst_sl;
printf ("modud result = %lu\n", dst_ul);
#endif
}
-
+#else
+ printf("HAS_ISA_3_00 not detected.\n");
+#endif // HAS_ISA_3_0
return 0;
}