diff options
author | Jesse Hall <jessehall@google.com> | 2014-06-07 00:16:33 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-06-07 00:16:33 +0000 |
commit | 17cbadf0f598b0d02179262ad5b6b270850ccb94 (patch) | |
tree | e2ec1795f9cf7fac86a015bc0fc5a66de6345d55 /opengl/libs/EGL | |
parent | 0c96c35fe47cd84f7423f925917b5dde97155e34 (diff) | |
parent | 6fa169faa955ecc47872557a5d4fd89a95190d5e (diff) | |
download | frameworks_native-17cbadf0f598b0d02179262ad5b6b270850ccb94.zip frameworks_native-17cbadf0f598b0d02179262ad5b6b270850ccb94.tar.gz frameworks_native-17cbadf0f598b0d02179262ad5b6b270850ccb94.tar.bz2 |
am 6fa169fa: Merge "Add aarch64 EGL/GLES trampolines"
* commit '6fa169faa955ecc47872557a5d4fd89a95190d5e':
Add aarch64 EGL/GLES trampolines
Diffstat (limited to 'opengl/libs/EGL')
-rw-r--r-- | opengl/libs/EGL/getProcAddress.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/opengl/libs/EGL/getProcAddress.cpp b/opengl/libs/EGL/getProcAddress.cpp index 5470d81..fc61134 100644 --- a/opengl/libs/EGL/getProcAddress.cpp +++ b/opengl/libs/EGL/getProcAddress.cpp @@ -53,9 +53,29 @@ namespace android { : [tls] "J"(TLS_SLOT_OPENGL_API*4), \ [api] "J"(__builtin_offsetof(gl_hooks_t, \ ext.extensions[_api])) \ - : \ + : "r12" \ ); +#elif defined(__aarch64__) + + #define API_ENTRY(_api) __attribute__((noinline)) _api + + #define CALL_GL_EXTENSION_API(_api) \ + asm volatile( \ + "mrs x16, tpidr_el0\n" \ + "ldr x16, [x16, %[tls]]\n" \ + "cbz x16, 1f\n" \ + "ldr x16, [x16, %[api]]\n" \ + "cbz x16, 1f\n" \ + "br x16\n" \ + "1:\n" \ + : \ + : [tls] "i" (TLS_SLOT_OPENGL_API * sizeof(void*)), \ + [api] "i" (__builtin_offsetof(gl_hooks_t, \ + ext.extensions[_api])) \ + : "x16" \ + ); + #elif defined(__i386__) #define API_ENTRY(_api) __attribute__((noinline)) _api |