diff options
author | Kyle Brenneman <kbrenneman@nvidia.com> | 2016-02-29 11:58:33 -0700 |
---|---|---|
committer | Kyle Brenneman <kbrenneman@nvidia.com> | 2016-02-29 13:50:40 -0700 |
commit | f95e3ae00d41aee2cb42c62368afb236c84eb66b (patch) | |
tree | 1dd4a7bb53ac648b44c0e3c5da12587fca9d6272 /include | |
parent | ba1c58a558f2df4c9abfb69cbeb027f9128f22ad (diff) |
GLdispatch: Change the stub type enums.
Removed the distinction between TSD and TLS stubs, since that doesn't matter to
a vendor library. There's now a single type for the x86 stubs and a single type
for the x86-64 stubs.
Added a separate type enum for normal ARM and thumb stubs. As with x86, there's
no distinction between TLS and TSD.
Changed the __GLDISPATCH_STUB_PURE_C enum to a more generic
__GLDISPATCH_STUB_UNKNOWN.
Also removed the internal ENTRY_* enums and changed everything to use the
__GLDISPATCH_STUB_* enums instead.
Diffstat (limited to 'include')
-rw-r--r-- | include/glvnd/GLdispatchABI.h | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/include/glvnd/GLdispatchABI.h b/include/glvnd/GLdispatchABI.h index d0fea5e..989743c 100644 --- a/include/glvnd/GLdispatchABI.h +++ b/include/glvnd/GLdispatchABI.h @@ -44,18 +44,45 @@ extern "C" { * these client ABIs. */ -/* - * Thread-local implementation used by libglvnd. This is passed into - * the patch function callback via the type parameter. +/*! + * Thread-local implementation used by libglvnd. This is passed into the patch + * function callback via the type parameter. + * + * For most architectures, the vendor library can ignore this parameter, since + * it will always be the same value. It's used for systems like ARM, where the + * stubs might be use the ARM or Thumb instruction sets. + * + * The stub type does not make any distinction between TLS and TSD stubs. The + * entire purpose of entrypoint rewriting is to skip the dispatch table in + * libGLdispatch.so, so it doesn't matter how that dispatch table is stored. */ enum { - __GLDISPATCH_STUB_X86_TLS, - __GLDISPATCH_STUB_X86_64_TLS, - __GLDISPATCH_STUB_X86_TSD, - __GLDISPATCH_STUB_PURE_C, - __GLDISPATCH_STUB_X86_64_TSD, - __GLDISPATCH_STUB_ARMV7_THUMB_TSD, - __GLDISPATCH_STUB_NUM_TYPES + /*! + * Indicates that the stubs aren't defined in assembly. For example, if the + * dispatch stubs are written in C. Vendor libraries generally won't see + * this value. + */ + __GLDISPATCH_STUB_UNKNOWN, + + /*! + * Used for stubs on x86 systems. + */ + __GLDISPATCH_STUB_X86, + + /*! + * Used for stubs on x86-64 systems. + */ + __GLDISPATCH_STUB_X86_64, + + /*! + * Used for stubs on ARMv7, using the Thumb instruction set. + */ + __GLDISPATCH_STUB_ARMV7_THUMB, + + /*! + * Used for stubs on ARMv7, using the normal ARM instruction set. + */ + __GLDISPATCH_STUB_ARMV7_ARM }; /*! |