News for hackers. Stuff that matters.
Re:Ask HN: Does anyone care about OpenPOWER? by h2odragon on Thursday February 08, 2024 @01:51PM (#39305905)
I have vague memories of PPC instructions sucking compared to alpha, sparc, and x86, 20 years or more ago. I've got no specific memories what my objection was; but I recall dropping my plans to support it as a platform after a very quick look at it.

Perhaps it didn't have atomics at that point? That would've killed it for that project.

Re:Ask HN: Does anyone care about OpenPOWER? by mdasen on Thursday February 08, 2024 @02:47PM (#39306677)
It seems unlikely that Power completely lacked atomics. This is a very vague recollection since it's been a long time, but I feel like there were some differences. I think PowerPC used a load-linked/store-conditional with a stronger guarantee than a CAS (compare and swap) on x86. For example, if x = 1 and you CAS it to a new value, another thread might have changed it to 8 and then back to 1 in the meantime and it'll still succeed (the ABA problem: https://en.wikipedia.org/wiki/ABA_problem).

I think x86 also has a stronger memory model providing less flexibility, but greater consistency.

Re:Ask HN: Does anyone care about OpenPOWER? by twic on Thursday February 08, 2024 @02:44PM (#39306635)
PowerPC uses LL/SC for synchronisation, which is very different to the classic x86 approach. Maybe you didn't like that? But i think Alpha and ARM use that too.
Re:Ask HN: Does anyone care about OpenPOWER? by inkyoto on Thursday February 08, 2024 @05:00PM (#39308362)
> Perhaps it didn't have atomics at that point? That would've killed it for that project.

That would have been PPC 601 and perhaps [entry level] 603 models. Motorola/IBM first released a single processor PPC, then they added support for multiprocessor systems which did have atomics – https://devblogs.microsoft.com/oldnewthing/20180814-00/?p=99...

Other than that, I immensely enjoyed hand writing PPC assembly – it is a very straightforward RISC design, the «rlwinm» / «rlwimi» instructions are fun – once you figure out how to use them.