Skip to content

Add PowerPC support to the timing and cache flush helpers - #63

Merged
ned14 merged 1 commit into
ned14:masterfrom
pkubaj:master
Oct 21, 2026
Merged

ned14 merged 1 commit into
ned14:masterfrom
pkubaj:master

Conversation

@pkubaj

@pkubaj pkubaj commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

test/timing.h and include/quickcpplib/mem_flush_loads_stores.hpp only
know x86 and AArch64 and fail with "#error Unsupported platform" on
PowerPC. Read the time base register through __builtin_ppc_get_timebase()
for the cycle counter, and implement the cache line flushes with dcbst
(write back, keep valid), dcbf (write back and invalidate) and sync,
using the same 64-byte line loop as the AArch64 implementation.

Tested by building on FreeBSD 15.1 powerpc64 and powerpc64le.

test/timing.h and include/quickcpplib/mem_flush_loads_stores.hpp only
know x86 and AArch64 and fail with "#error Unsupported platform" on
PowerPC.  Read the time base register through __builtin_ppc_get_timebase()
for the cycle counter, and implement the cache line flushes with dcbst
(write back, keep valid), dcbf (write back and invalidate) and sync,
using the same 64-byte line loop as the AArch64 implementation.

Tested by building on FreeBSD 15.1 powerpc64 and powerpc64le.
@ned14
ned14 merged commit 1506360 into ned14:master Oct 21, 2026
8 of 10 checks passed
@ned14

ned14 commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR!

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

Successfully merging this pull request may close these issues.

2 participants