Skip to contentSkip to conversation

ia64: Disable optimizations using floating-point arithmetics

PATCH New Vladimir Serbinenko 1 participant 1 message May 3, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ia64: Disable optimizations using floating-point arithmetics

Options -minline-int-divide-* enable performing int division using floating point unit.
They don't work in ski emulator and possibly on some real hardware. We don't really need them, so just use normal division.

---
 configure.ac                | 4 ++--
 grub-core/Makefile.core.def | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
configure.ac +2 -2
index e34e3cd59..2e95dbce9 100644
@@ -959,9 +959,9 @@ if test x"$platform" != xemu ; then
 		         [grub_cv_target_cc_soft_float="-march=rv64imac_zicsr_zifencei -mabi=lp64"], [])
     fi
     if test "x$target_cpu" = xia64; then
-       CFLAGS="$TARGET_CFLAGS -mno-inline-float-divide -mno-inline-sqrt -Werror"
+       CFLAGS="$TARGET_CFLAGS -mno-inline-int-divide -mno-inline-float-divide -mno-inline-sqrt -Werror"
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
-		         [grub_cv_target_cc_soft_float="-mno-inline-float-divide -mno-inline-sqrt"], [])
+		         [grub_cv_target_cc_soft_float="-mno-inline-int-divide -mno-inline-float-divide -mno-inline-sqrt"], [])
     fi
     if test "x$target_cpu" = xsh4; then
        CFLAGS="$TARGET_CFLAGS -m4-nofpu -Werror"
grub-core/Makefile.core.def +1 -1
index 9cc0a0ac3..cf65f367b 100644
@@ -57,7 +57,7 @@ kernel = {
   x86_64_efi_ldflags       = '$(TARGET_RELOCATABLE)';
   x86_64_efi_stripflags    = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
 
-  ia64_efi_cflags = '-fshort-wchar -fno-builtin -fpic -minline-int-divide-max-throughput';
+  ia64_efi_cflags = '-fshort-wchar -fno-builtin -fpic';
   ia64_efi_ldflags = '-shared';
   ia64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
 
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel