
Hi Heinrich,
On Thu, 28 Sept 2023 at 00:26, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
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 disable SSE on 64-bit x86, even though the CPU always supports it. The compiler assumes it is available, so presumably emits SSE things.
I suspect there is some CPU init missing after U-Boot changes to 64-bit long mode.
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-...).
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.
Good luck with that :-) It uses STB for Truetype...probably there is an integer implementation somewhere but I'm not sure.
Regards, Simon