SSE instructions

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Thu Sep 28 08:26:58 CEST 2023


On 9/28/23 04:41, Simon Glass wrote:
> Hi Bin,
> 
> U-Boot 64-bit on x86 disables sse, but when enabling Truetype I get a
> compiler error:
> 
> drivers/video/console_truetype.c: In function 'frac':
> drivers/video/console_truetype.c:30:15: error: SSE register return
> with SSE disabled
> 30 | static double frac(double val)
> 
> Do you know how to enable SSE for 64-bit?

How could this occur if x86 disables SSE? There must be some 
inconsistency in how this module is built.

We a need a clarification of the used ABI per architecture and write 
this into our documentation.

The RISC-V profile specification does not foresee float and double in 
S-mode (see RVA20S64 and RVAS22S64 profiles in 
https://github.com/riscv/riscv-profiles/blob/main/profiles.adoc#52-rva20s64-profile).

We should convert drivers/video/console_truetype.c to use integers 
(where low bits are used for the fractional part) instead of float and 
double to make the driver compatible to non-x86 platforms.

Best regards

Heinrich


More information about the U-Boot mailing list