d53e4307c2
GCC's __builtin_prefetch() was introduced a long time ago, all
supported GCC versions have it. So this patch is to use it for
implementing the prefetch on SH2A and SH4.
The current prefetch implementation is almost equivalent with
__builtin_prefetch.
The third parameter in the __builtin_prefetch is the locality
that it's not supported on SH architectures. It has been set
to three and it should be verified if it's suitable for SH2A
as well. I didn't test on this architecture.
The builtin usage should be more efficient that an __asm__
because less barriers, and because the compiler doesn't see the
inst as a "black box" allowing better code generation.
This has been already done on other architectures (see the commit:
|
||
---|---|---|
.. | ||
asm | ||
cpu-common/cpu | ||
cpu-sh2/cpu | ||
cpu-sh2a/cpu | ||
cpu-sh3/cpu | ||
cpu-sh4/cpu | ||
cpu-sh5/cpu | ||
mach-common/mach | ||
mach-dreamcast/mach | ||
mach-ecovec24/mach | ||
mach-kfr2r09/mach | ||
mach-landisk/mach | ||
mach-migor/mach | ||
mach-sdk7786/mach | ||
mach-se/mach | ||
mach-sh03/mach | ||
mach-x3proto/mach |