• barsoap@lemm.ee
    link
    fedilink
    English
    arrow-up
    13
    ·
    9 months ago

    Software tends to be written against an operating system or slightly more high-level API, not against an instruction set. We’re not in the 1960s, any more, compilers exist.

    Even back during the x86 to x86_64 switchover people didn’t re-write software, we mostly just cleaned up legacy code, removing old architecture-dependent tricks that wouldn’t work in 64 bit mode and hadn’t been necessary to achieve proper performance for a couple of hardware generations, anyway.

    There’s always going to be exceptions but if your calculator app needs more work than a recompile you did something wrong. Possible sources of nastiness in otherwise well-written software include anything that relies on manual memory layout, mostly alignment issues (endianness isn’t an issue x86 vs. ARM) and very occasionally some inline assembly for the simple reason that inline assembly has become exceedingly rare. I say “well-written” because there’s e.g. C code out there hitting so much undefined behaviour that it compiles on exactly one compiler and runs on one architecture but even then it’s a case-by-case call on whether to rewrite or clean it up. I’d tend towards rewrite in Rust but there’s conceivable exceptions. Also you should’ve fixed that shit up years ago.