• Alex@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    4 months ago

    QEMU absolutely will use hardware floating point where it can but only when it will give the correct results. FEX and Box64 are user mode emulators which achieve their speed by avoiding emulation where they can buy thunking at API boundaries.

    • henfredemars@infosec.pub
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      4 months ago

      Call it a difference of opinion that I don’t believe it should try to be bit-accurate for floating point. But, it’s a valid position to take. There are many use cases for QEMU. In this case where we emit some host instructions I do believe it’s still within the helper function instead of inline which is not ideal. The guest code using floating point in the first place to me implies some degree of inaccuracy is permissible and this is the position that some cross architecture game emulators take. But again, I suppose it can depend what code you wish to run.

      • Alex@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        4 months ago

        QEMU is always going to focus on emulation fidelity first and there are few shortcuts. With floating point the differences aren’t generally in the numbers but in how the NaNs and other edge cases are handled. If you want to execute FP heavy code you should be cross compiling anyway.