Commit graph

10 commits

Author SHA1 Message Date
Kyle Brenneman 8b4f6aeb7a PPC64LE: Fix the cache clear instructions.
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.
2017-06-13 11:53:51 -06:00
Ben Crocker 962fc1a161 tests: Fill in the ASM code in the template in patch_ppc64le().
Signed-off-by: Ben Crocker <bcrocker@redhat.com>
2017-04-24 11:50:07 -06:00
Kyle Brenneman e77d29a67c Makefile and structural changes for ppc64le support.
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.
2017-04-24 11:49:02 -06:00
Kyle Brenneman 8e6e102820 Merge branch 'x32-support'
Fixes https://github.com/NVIDIA/libglvnd/issues/115
2017-03-08 13:41:29 -07:00
Kyle Brenneman bb3d4a044c tests: Add support for x32.
Update the entrypoint patching tests to work on an x32 build. On x32, it'll use
the same patching as it would for x86-64.
2017-03-08 13:40:00 -07:00
Kyle Brenneman 8b7a44fb6d tests: Expand the unit tests for libGLdispatch.
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.
2017-02-28 16:37:36 -07:00
Kyle Brenneman 522c601799 Add support for aarch64.
Add assembly code and stub generation for TSD stubs on aarch64.
2016-11-15 08:36:51 -07:00
Kyle Brenneman f556baa293 Change the assembly templates for ARMv7 to use uint16_t.
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.
2016-10-18 15:25:21 -06:00
Kyle Brenneman a813b56339 tests: Add a more extensive test for entrypoint patching.
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.
2016-10-17 11:12:21 -06:00
Kyle Brenneman dbfaa50bd8 tests: Move the entrypoint patching code into a helper library.
Moved the code for testing entrypoint patching into a helper library so that
it can be used for more than just GLX.
2016-10-17 11:12:21 -06:00