SSE register return with SSE disabled

前端 未结 1 1149
余生分开走
余生分开走 2020-12-01 18:33

I am in the following situation:

  • I am writing code for a kernel that does not allow SSE instructions
  • I need to do floating-point arithmetic
  • I
相关标签:
1条回答
  • 2020-12-01 19:13

    It sounds like the compiler is emitting a call to a library routine to do the floating point multiply for you (presumably without using SSE), but is trying to use an ABI for the call that has the return value passed in SSE. Obviously, that doesn't work.

    If it is possible at all to use floating-point at all in your kernel, there should be a special runtime library to do soft-float operations that does not use the usual (userland) argument passing and return conventions. However, as far as I know, there is no support for floating-point in the BSD kernel. That was certainly the case a few years ago.

    You should probably just ask the BSD kernel dev email list whether or not it is possible to use floating-point; I suspect it will give you a faster more definitive answer than SO.

    0 讨论(0)
提交回复
热议问题