[PATCH v3 09/12] x86: Enable SSE in 64-bit mode

Simon Glass sjg at chromium.org
Sun Nov 12 21:01:10 CET 2023


Hi Bin,

On Mon, 6 Nov 2023 at 08:36, Tom Rini <trini at konsulko.com> wrote:
>
> On Mon, Nov 06, 2023 at 06:26:15PM +0800, Bin Meng wrote:
> > + Tom,
> >
> > Hi Simon,
> >
> > On Mon, Nov 6, 2023 at 12:29 AM Simon Glass <sjg at chromium.org> wrote:
> > >
> > > Hi Bin,
> > >
> > > On Sun, 5 Nov 2023 at 14:05, Bin Meng <bmeng.cn at gmail.com> wrote:
> > > >
> > > > Hi Simon,
> > > >
> > > > On Mon, Oct 2, 2023 at 9:15 AM Simon Glass <sjg at chromium.org> wrote:
> > > > >
> > > > > This is needed to support Truetype fonts. In any case, the compiler
> > > > > expects SSE to be available in 64-bit mode. Enable it.
> > > > >
> > > > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > > > Suggested-by: Bin Meng <bmeng.cn at gmail.com>
> > > > > ---
> > > > >
> > > > > (no changes since v1)
> > > > >
> > > > >  arch/x86/config.mk        |  1 -
> > > > >  arch/x86/cpu/x86_64/cpu.c | 11 +++++++++++
> > > > >  2 files changed, 11 insertions(+), 1 deletion(-)
> > > > >
> > > >
> > > > I didn't suggest we enable SSE for x86. This is the wrong approach.
> > > >
> > > > We should rewrite the Truetype support codes to avoid using float/double types.
> > > >
> > > > This way the Truetype codes can be used on any other architectures
> > > > without the need for the compiler to emit explicit floating
> > > > instructions.
> > >
> > > I am not aware of any such library. At present, enabling truetype on
> > > coreboot64 causes a hang.
> > >
> >
> > If that's the case, we will have to either:
> >
> > - Switch all U-Boot builds' to use software float (e.g. -msoft-float)
> > which unfortunately depends on the compiler runtime intrinsics.
> > - Introduce a Kconfig option for hard float enabling and let each
> > architecture to decide whether it implements it or not, and update
> > Truetype to depend on the hard float.
>
> We generally do -msoft-float already, so introducing that for x86, and
> some Kconfig logic to ensure that no one else steps on this particular
> bug sounds reasonable.

Yes soft float seems to be not-much-used on x86. For 64-bit chips the
compiler seems to assume that hardfp is available.

So perhaps the best thing is to introduce a HARDFP option to x86 only.

Regards,
Simon


More information about the U-Boot mailing list