summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-02-13 17:30:54 -0800
committerElliott Hughes <enh@google.com>2013-02-13 17:30:54 -0800
commit288870ebc3da8121b7a237a53280bd8b931b7a2f (patch)
treeb5c73c8ed31a810b18e62da2e33f2948b09867f5
parent873ab60e94811488caea1906eb98133329a3e28f (diff)
downloadframeworks_native-288870ebc3da8121b7a237a53280bd8b931b7a2f.zip
frameworks_native-288870ebc3da8121b7a237a53280bd8b931b7a2f.tar.gz
frameworks_native-288870ebc3da8121b7a237a53280bd8b931b7a2f.tar.bz2
Simplify OpenGL TLS access on ARM.
bionic now assumes the TLS register is available, so OpenGL can too. Change-Id: If2b56a4c08de9f887759b78f70022026a181dc47
-rw-r--r--opengl/libagl/Android.mk9
-rw-r--r--opengl/libs/Android.mk23
-rw-r--r--opengl/libs/EGL/getProcAddress.cpp9
-rw-r--r--opengl/libs/GLES2/gl2.cpp9
-rw-r--r--opengl/libs/GLES_CM/gl.cpp9
-rw-r--r--opengl/libs/GLES_trace/Android.mk9
6 files changed, 3 insertions, 65 deletions
diff --git a/opengl/libagl/Android.mk b/opengl/libagl/Android.mk
index 639c4d7..1b3d6ed 100644
--- a/opengl/libagl/Android.mk
+++ b/opengl/libagl/Android.mk
@@ -34,16 +34,7 @@ ifeq ($(TARGET_ARCH),arm)
LOCAL_CFLAGS += -fstrict-aliasing
endif
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-
# we need to access the private Bionic header <bionic_tls.h>
-# on ARM platforms, we need to mirror the ARCH_ARM_HAVE_TLS_REGISTER
-# behavior from the bionic Android.mk file
-ifeq ($(TARGET_ARCH)-$(ARCH_ARM_HAVE_TLS_REGISTER),arm-true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
LOCAL_C_INCLUDES += bionic/libc/private
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk
index 31bfcd7..d025ae8 100644
--- a/opengl/libs/Android.mk
+++ b/opengl/libs/Android.mk
@@ -23,11 +23,6 @@ LOCAL_LDLIBS := -lpthread -ldl
LOCAL_MODULE:= libEGL
LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL
LOCAL_SHARED_LIBRARIES += libdl
-# Bionic's private TLS header relies on the ARCH_ARM_HAVE_TLS_REGISTER to
-# select the appropriate TLS codepath
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
# we need to access the private Bionic header <bionic_tls.h>
LOCAL_C_INCLUDES += bionic/libc/private
@@ -49,10 +44,6 @@ ifeq ($(TARGET_BOARD_PLATFORM), s5pc110)
LOCAL_CFLAGS += -DSYSTEMUI_PBSIZE_HACK=1
endif
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-
ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),)
LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE)
endif
@@ -100,19 +91,12 @@ LOCAL_MODULE:= libGLESv1_CM
LOCAL_SHARED_LIBRARIES += libdl
# we need to access the private Bionic header <bionic_tls.h>
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
LOCAL_C_INCLUDES += bionic/libc/private
LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv1\"
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
LOCAL_CFLAGS += -fvisibility=hidden
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-
include $(BUILD_SHARED_LIBRARY)
@@ -132,19 +116,12 @@ LOCAL_MODULE:= libGLESv2
LOCAL_SHARED_LIBRARIES += libdl
# we need to access the private Bionic header <bionic_tls.h>
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
LOCAL_C_INCLUDES += bionic/libc/private
LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv2\"
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
LOCAL_CFLAGS += -fvisibility=hidden
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-
include $(BUILD_SHARED_LIBRARY)
###############################################################################
diff --git a/opengl/libs/EGL/getProcAddress.cpp b/opengl/libs/EGL/getProcAddress.cpp
index 8dcf38d..f453176 100644
--- a/opengl/libs/EGL/getProcAddress.cpp
+++ b/opengl/libs/EGL/getProcAddress.cpp
@@ -37,14 +37,7 @@ namespace android {
#if USE_FAST_TLS_KEY
- #ifdef HAVE_ARM_TLS_REGISTER
- #define GET_TLS(reg) \
- "mrc p15, 0, " #reg ", c13, c0, 3 \n"
- #else
- #define GET_TLS(reg) \
- "mov " #reg ", #0xFFFF0FFF \n" \
- "ldr " #reg ", [" #reg ", #-15] \n"
- #endif
+ #define GET_TLS(reg) "mrc p15, 0, " #reg ", c13, c0, 3 \n"
#define API_ENTRY(_api) __attribute__((naked)) _api
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp
index 55ef499..fca42ec 100644
--- a/opengl/libs/GLES2/gl2.cpp
+++ b/opengl/libs/GLES2/gl2.cpp
@@ -41,14 +41,7 @@ using namespace android;
#if USE_FAST_TLS_KEY
- #ifdef HAVE_ARM_TLS_REGISTER
- #define GET_TLS(reg) \
- "mrc p15, 0, " #reg ", c13, c0, 3 \n"
- #else
- #define GET_TLS(reg) \
- "mov " #reg ", #0xFFFF0FFF \n" \
- "ldr " #reg ", [" #reg ", #-15] \n"
- #endif
+ #define GET_TLS(reg) "mrc p15, 0, " #reg ", c13, c0, 3 \n"
#define API_ENTRY(_api) __attribute__((naked)) _api
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
index adcb60d..48fd278 100644
--- a/opengl/libs/GLES_CM/gl.cpp
+++ b/opengl/libs/GLES_CM/gl.cpp
@@ -97,14 +97,7 @@ GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
#if USE_FAST_TLS_KEY && !CHECK_FOR_GL_ERRORS
- #ifdef HAVE_ARM_TLS_REGISTER
- #define GET_TLS(reg) \
- "mrc p15, 0, " #reg ", c13, c0, 3 \n"
- #else
- #define GET_TLS(reg) \
- "mov " #reg ", #0xFFFF0FFF \n" \
- "ldr " #reg ", [" #reg ", #-15] \n"
- #endif
+ #define GET_TLS(reg) "mrc p15, 0, " #reg ", c13, c0, 3 \n"
#define API_ENTRY(_api) __attribute__((naked)) _api
diff --git a/opengl/libs/GLES_trace/Android.mk b/opengl/libs/GLES_trace/Android.mk
index 465b6b2..9dec020 100644
--- a/opengl/libs/GLES_trace/Android.mk
+++ b/opengl/libs/GLES_trace/Android.mk
@@ -24,18 +24,9 @@ LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI
LOCAL_STATIC_LIBRARIES := libprotobuf-cpp-2.3.0-lite liblzf
LOCAL_SHARED_LIBRARIES := libcutils libutils libstlport
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-
LOCAL_CFLAGS += -DLOG_TAG=\"libGLES_trace\"
# we need to access the private Bionic header <bionic_tls.h>
-# on ARM platforms, we need to mirror the ARCH_ARM_HAVE_TLS_REGISTER
-# behavior from the bionic Android.mk file
-ifeq ($(TARGET_ARCH)-$(ARCH_ARM_HAVE_TLS_REGISTER),arm-true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
LOCAL_C_INCLUDES += bionic/libc/private
LOCAL_MODULE:= libGLES_trace