• Buddahriffic@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    2 hours ago

    This problem is far more difficult to solve than x64 windows apps running on x64 linux.

    While x64 and ARM are both turing complete and thus anything one can do, the other can also do, there can be subtle differences to the way they do them.

    Like one I’m aware of is the atomicity of loading memory using a co-processor register, which is required for accessing thread local storage, and introduces a subtle race condition if someone uses user mode multithreading (which can be way faster than kernel mode multithreading) without handling the case where they get preempted between moving that register’s value and doing the load, and end up running on a different kernel thread when they get back (because you need one kernel thread per core). That thread would end up with the pointer for another thread’s thread local storage, which tends to break things pretty badly.

    That’s just one that I’m aware of. There’s probably tons of other subtle differences that mean you can’t just have a map of “x in x64 means y in ARM” and use that to generate a compatible binary. It would probably run, but it would have bugs that the original doesn’t that are only seen in rare edge cases.

    Not that I want to discourage this effort, but this is a problem an order of magnitude or two more difficult than the one proton solved, which was essentially just a bunch of wrappers that convert one API or OS behaviour to another equivalent one.

    • moonpiedumplings@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      2 hours ago

      I understand the technical challenges with running x86 apps on arm… but multiple wrappers that do something similar to proton have already been released.

      If you follow the r/emulationonandroid subreddit, they have gotten PC games working on android for a while now. One of the wrappers, gamehub, has made it to the playstore. You can just sign in to your steam account (don’t do that gamehub is sketchy af, proprietary, and by a company that stole gpl code fro, yuzu and didn’t release a derivative product), download games, and play them.

      The current concern is performance, but most lower and midrange games run just fine.

      • Buddahriffic@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        2 hours ago

        Yeah, a lot of programs will likely run fine. The common issues will be solved. But the subtle ones will be frustrating. Plus I worry about a situation where apps target x64 and run on ARM but aren’t supported on ARM, kinda like what we’ve got with games on linux right now.