Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for PowerPC #10

Open
barracuda156 opened this issue Sep 10, 2024 · 4 comments
Open

Support for PowerPC #10

barracuda156 opened this issue Sep 10, 2024 · 4 comments

Comments

@barracuda156
Copy link

Could we have support for PowerPC as well? Currently only x86 and arm are there.

@mackron
Copy link
Owner

mackron commented Sep 11, 2024

So c89atomic will by default use GCC's atomic intrinsics before falling back to any architecture-specific inlined assembly in the situation where those instrinsics are unavailable. If your compilation environment supports those intrinsics, I think it should "just work"? I'd be happy enough to add support for PowerPC inlined assembly for the fallback path, but that would need to be contributed by the community.

@barracuda156
Copy link
Author

@ mackron As long as modern ones (__atomic*) are used, that will work with modern compilers, but those support C11/C++11. Old built-ins __sync* will only work for 32-bit values, but not for 64-bit. I think Xcode gcc-4.2 supports neither though (it is pre-C11).

@mackron
Copy link
Owner

mackron commented Sep 11, 2024

I'd be happy to support PowerPC in some form if the community contributed it. I have no experience with PowerPC whatsoever nor any personal requirement for it so I have no motivation to do it personally.

Does PowerPC actually support 64-bit atomics? If it's not supported by the architecture it won't be support by c89atomic either (I have no interest in simulating it via a global mutex or anything).

@barracuda156
Copy link
Author

Does PowerPC actually support 64-bit atomics? If it's not supported by the architecture it won't be support by c89atomic either (I have no interest in simulating it via a global mutex or anything).

ppc supports it only via libatomic (which works fine). ppc64 supports it in hardware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants