All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ia64: Disable optimizations using floating-point arithmetics
@ 2025-04-10 10:45 Vladimir Serbinenko
  2025-04-10 15:32 ` Daniel Kiper
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Serbinenko @ 2025-04-10 10:45 UTC (permalink / raw)
  To: grub-devel; +Cc: Vladimir Serbinenko

They don't work in ski emulator and we don't really need them

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
---
 configure.ac                | 4 ++--
 grub-core/Makefile.core.def | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 25f3ff932..ecb8bc666 100644
--- a/configure.ac
+++ b/configure.ac
@@ -933,9 +933,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"
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 4c6269c2b..f0b9ea48a 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -57,7 +57,7 @@ kernel = {
   x86_64_efi_ldflags       = '-shared';
   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';
 
-- 
2.49.0


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ia64: Disable optimizations using floating-point arithmetics
  2025-04-10 10:45 [PATCH] ia64: Disable optimizations using floating-point arithmetics Vladimir Serbinenko
@ 2025-04-10 15:32 ` Daniel Kiper
  2025-04-10 15:34   ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Kiper @ 2025-04-10 15:32 UTC (permalink / raw)
  To: Vladimir Serbinenko; +Cc: grub-devel

On Thu, Apr 10, 2025 at 01:45:37PM +0300, Vladimir Serbinenko wrote:
> They don't work in ski emulator and we don't really need them
>
> Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
> ---
>  configure.ac                | 4 ++--
>  grub-core/Makefile.core.def | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 25f3ff932..ecb8bc666 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -933,9 +933,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"], [])

I think you are dealing with int instead of float. I suppose the subject
has to be fixed.

Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ia64: Disable optimizations using floating-point arithmetics
  2025-04-10 15:32 ` Daniel Kiper
@ 2025-04-10 15:34   ` Vladimir 'phcoder' Serbinenko
  2025-04-11 14:38     ` Daniel Kiper
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2025-04-10 15:34 UTC (permalink / raw)
  To: Daniel Kiper; +Cc: The development of GRUB 2


[-- Attachment #1.1: Type: text/plain, Size: 1543 bytes --]

Regards
Vladimir 'phcoder' Serbinenko

Le jeu. 10 avr. 2025, 18:32, Daniel Kiper <dkiper@net-space.pl> a écrit :

> On Thu, Apr 10, 2025 at 01:45:37PM +0300, Vladimir Serbinenko wrote:
> > They don't work in ski emulator and we don't really need them
> >
> > Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
> > ---
> >  configure.ac                | 4 ++--
> >  grub-core/Makefile.core.def | 2 +-
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 25f3ff932..ecb8bc666 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -933,9 +933,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"], [])
>
> I think you are dealing with int instead of float. I suppose the subject
> has to be fixed.
>
-minline-int-divide replaced integer divisions with floating point
operations. So it does use for arithmetic despite its name


> Daniel
>

[-- Attachment #1.2: Type: text/html, Size: 2920 bytes --]

[-- Attachment #2: Type: text/plain, Size: 141 bytes --]

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ia64: Disable optimizations using floating-point arithmetics
  2025-04-10 15:34   ` Vladimir 'phcoder' Serbinenko
@ 2025-04-11 14:38     ` Daniel Kiper
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Kiper @ 2025-04-11 14:38 UTC (permalink / raw)
  To: Vladimir 'phcoder' Serbinenko; +Cc: The development of GRUB 2

On Thu, Apr 10, 2025 at 06:34:26PM +0300, Vladimir 'phcoder' Serbinenko wrote:
> Regards
> Vladimir 'phcoder' Serbinenko
>
> Le jeu. 10 avr. 2025, 18:32, Daniel Kiper <dkiper@net-space.pl> a écrit :
>      On Thu, Apr 10, 2025 at 01:45:37PM +0300, Vladimir Serbinenko wrote:
>      > They don't work in ski emulator and we don't really need them
>      >
>      > Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
>      > ---
>      >  configure.ac                | 4 ++--
>      >  grub-core/Makefile.core.def | 2 +-
>      >  2 files changed, 3 insertions(+), 3 deletions(-)
>      >
>      > diff --git a/configure.ac b/configure.ac
>      > index 25f3ff932..ecb8bc666 100644
>      > --- a/configure.ac
>      > +++ b/configure.ac
>      > @@ -933,9 +933,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"], [])
>
>      I think you are dealing with int instead of float. I suppose the
>      subject
>      has to be fixed.
> -minline-int-divide replaced integer divisions with floating point operations.

It looks there is no -minline-int-divide. Though there are -minline-int-divide-min-latency
and -minline-int-divide-max-throughput.

> So it does use for arithmetic despite its name

So, I think it should be better explained in the commit message.

Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-11 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-10 10:45 [PATCH] ia64: Disable optimizations using floating-point arithmetics Vladimir Serbinenko
2025-04-10 15:32 ` Daniel Kiper
2025-04-10 15:34   ` Vladimir 'phcoder' Serbinenko
2025-04-11 14:38     ` Daniel Kiper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.