Change the cache clear instructions for generated PPC64LE code so that it uses
an input variable instead of an output variable.
With an output variable, it doesn't use the correct address for the dcbst and
icbi instructions, possibly causing it to crash.
Added the files and makefile changes needed for adding support for ppc64le
dispatch stubs.
The actual assembly code still needs to be written, along with any other
arch-specific requirements for self-modifying code.
The new entry_ppc64le_*.c files are mostly based on the x86-64 files.
It still needs:
- Assembly code for OpenGL dispatch stubs in entry_ppc64le_tls.c,
entry_ppc64le_tsd.c, or both.
- Assembly code for GLX dispatch stubs in glvnd_genentry.c.
- Assembly code for the entrypoint patching tests in patchentrypoints.c.
Replaced testpatchentrypoints_gldispatch with three new unit tests.
testgldispatch_static and testgldispatch_generated test dispatching to multiple
vendor libraries through static and generated dispatch stubs, respectively.
testgldispatch_generated tests entrypoint patching and unpatching. This adds
coverage for patching generated stubs in addition to the static ones.
The entrypoint patching functions in tests/dummy/patchentrypoints.c now take
the name of the function to patch, instead of hard-coding it to only patch
glVertex3fv.
Change the assembly template arrays for ARMv7 to use arrays of 16-bit integers
instead of 8-bit.
This removes the need to byte swap them on little-endian systems.
Add a new unit test, testpatchentrypoints_gldispatch. It calls into
libGLdispatch directly instead of going through GLX or EGL, and it tests
patching and unpatching between multiple vendor libraries.
Rewrote the x86-64 assembly for the entrypoint patching tests. It now uses
absolute memory addresses instead of RIP-relative, so it can work even if the
variable that it's supposed to update isn't within +-2GB of the function.