mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
Fix dfp tests.
Due to changes between the compiler and linker, we need to add .machine arguments to configure file to properly detect the availability of the dfp instructions. Add print statement if HAS_DFP is not enabled to make it easier to determine when HAS_DFP is not enabled.
This commit is contained in:
parent
475916cbd3
commit
518a2d59ac
14
configure.ac
14
configure.ac
@ -1563,14 +1563,17 @@ AM_CONDITIONAL([HAS_VSX], [test x$ac_compiler_supports_vsx_flag = xyes \
|
||||
-a x$HWCAP_HAS_VSX = xyes ])
|
||||
|
||||
# DFP (Decimal Float)
|
||||
# The initial DFP support was added in Power 6. The dcffix instruction
|
||||
# support was added in Power 7.
|
||||
AC_MSG_CHECKING([that assembler knows DFP])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
]], [[
|
||||
#ifdef __s390__
|
||||
__asm__ __volatile__("adtr 1, 2, 3")
|
||||
#else
|
||||
__asm__ __volatile__("dadd 1, 2, 3");
|
||||
__asm__ __volatile__("dcffix 1, 2");
|
||||
__asm__ __volatile__(".machine power7;\n" \
|
||||
"dadd 1, 2, 3;\n" \
|
||||
"dcffix 1, 2");
|
||||
#endif
|
||||
]])], [
|
||||
ac_asm_have_dfp=yes
|
||||
@ -1582,13 +1585,16 @@ AC_MSG_RESULT([no])
|
||||
AC_MSG_CHECKING([that compiler knows -mhard-dfp switch])
|
||||
safe_CFLAGS=$CFLAGS
|
||||
CFLAGS="-mhard-dfp -Werror"
|
||||
|
||||
# The dcffix instruction is Power 7
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
]], [[
|
||||
#ifdef __s390__
|
||||
__asm__ __volatile__("adtr 1, 2, 3")
|
||||
#else
|
||||
__asm__ __volatile__("dadd 1, 2, 3");
|
||||
__asm__ __volatile__("dcffix 1, 2");
|
||||
__asm__ __volatile__(".machine power7;\n" \
|
||||
"dadd 1, 2, 3;\n" \
|
||||
"dcffix 1, 2");
|
||||
#endif
|
||||
]])], [
|
||||
ac_compiler_have_dfp=yes
|
||||
|
||||
@ -497,6 +497,8 @@ int main() {
|
||||
i++;
|
||||
}
|
||||
|
||||
#else
|
||||
printf("HAS_DFP not detected.\n");
|
||||
#endif // HAS_DFP
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -668,6 +668,8 @@ int main(int argc, char ** argv, char ** envp) {
|
||||
i++;
|
||||
}
|
||||
|
||||
#else
|
||||
printf("HAS_DFP not detected.\n");
|
||||
#endif // HAS_DFP
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1256,6 +1256,8 @@ int main() {
|
||||
i++;
|
||||
}
|
||||
|
||||
#else
|
||||
printf("HAS_DFP not detected.\n");
|
||||
#endif // HAS_DFP
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -636,6 +636,8 @@ int main() {
|
||||
i++;
|
||||
}
|
||||
|
||||
#else
|
||||
printf("HAS_DFP not detected.\n");
|
||||
#endif // HAS_DFP
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -605,6 +605,8 @@ int main() {
|
||||
i++;
|
||||
}
|
||||
|
||||
#else
|
||||
printf("HAS_DFP not detected.\n");
|
||||
#endif // HAS_DFP
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
prereq: ../../../tests/check_ppc64_auxv_cap dfp
|
||||
prereq: ../../../tests/check_ppc64_auxv_cap dfp && ../../../tests/check_ppc64_auxv_cap arch_2_06
|
||||
prog: test_dfp1
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
prereq: ../../../tests/check_ppc64_auxv_cap dfp
|
||||
prereq: ../../../tests/check_ppc64_auxv_cap dfp && ../../../tests/check_ppc64_auxv_cap arch_2_06
|
||||
prog: test_dfp2
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
prereq: ../../../tests/check_ppc64_auxv_cap dfp
|
||||
prereq: ../../../tests/check_ppc64_auxv_cap dfp && ../../../tests/check_ppc64_auxv_cap arch_2_06
|
||||
prog: test_dfp3
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
prereq: ../../../tests/check_ppc64_auxv_cap dfp
|
||||
prereq: ../../../tests/check_ppc64_auxv_cap dfp && ../../../tests/check_ppc64_auxv_cap arch_2_06
|
||||
prog: test_dfp4
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
prereq: ../../../tests/check_ppc64_auxv_cap dfp
|
||||
prereq: ../../../tests/check_ppc64_auxv_cap dfp && ../../../tests/check_ppc64_auxv_cap arch_2_06
|
||||
prog: test_dfp5
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user