summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorNikola Veljkovic2014-12-26 10:33:14 -0600
committerNikola Veljkovic2015-01-19 08:58:32 -0600
commit5f5f65183c9a77bd4b5dc63b5767af69ac938b39 (patch)
tree5c519da3a7052875d105896a0607cda996b689d9 /opengl
parent6701fbe5f0d799c5245b0cdf3a69ecdcbfd9fb08 (diff)
downloadframeworks-native-5f5f65183c9a77bd4b5dc63b5767af69ac938b39.tar.gz
frameworks-native-5f5f65183c9a77bd4b5dc63b5767af69ac938b39.tar.xz
frameworks-native-5f5f65183c9a77bd4b5dc63b5767af69ac938b39.zip
Use register numbers instead of register names
Avoid ambiguity by using register numbers. Register names are interpreted depending on the ABI. Fixes the issue with mips64 gcc, where registers t0-t4 are translated into $8-$11 (o32 ABI) instead of $12-$15 (o64 ABI). Also, use t9 ($25) for storing function address (in getProcAddress.cpp). Change-Id: I12ef5cd98bf14dab3c01f2756889cc02856c1cd8
Diffstat (limited to 'opengl')
-rw-r--r--opengl/libs/EGL/getProcAddress.cpp12
-rw-r--r--opengl/libs/GLES2/gl2.cpp16
-rw-r--r--opengl/libs/GLES_CM/gl.cpp16
3 files changed, 22 insertions, 22 deletions
diff --git a/opengl/libs/EGL/getProcAddress.cpp b/opengl/libs/EGL/getProcAddress.cpp
index 25cffaec9..2b2b2270e 100644
--- a/opengl/libs/EGL/getProcAddress.cpp
+++ b/opengl/libs/EGL/getProcAddress.cpp
@@ -125,9 +125,9 @@ namespace android {
125 #define API_ENTRY(_api) __attribute__((noinline)) _api 125 #define API_ENTRY(_api) __attribute__((noinline)) _api
126 126
127 #define CALL_GL_EXTENSION_API(_api, ...) \ 127 #define CALL_GL_EXTENSION_API(_api, ...) \
128 register unsigned int _t0 asm("t0"); \ 128 register unsigned int _t0 asm("$12"); \
129 register unsigned int _fn asm("t1"); \ 129 register unsigned int _fn asm("$25"); \
130 register unsigned int _tls asm("v1"); \ 130 register unsigned int _tls asm("$3"); \
131 asm volatile( \ 131 asm volatile( \
132 ".set push\n\t" \ 132 ".set push\n\t" \
133 ".set noreorder\n\t" \ 133 ".set noreorder\n\t" \
@@ -157,9 +157,9 @@ namespace android {
157 #define API_ENTRY(_api) __attribute__((noinline)) _api 157 #define API_ENTRY(_api) __attribute__((noinline)) _api
158 158
159 #define CALL_GL_EXTENSION_API(_api, ...) \ 159 #define CALL_GL_EXTENSION_API(_api, ...) \
160 register unsigned int _t0 asm("t0"); \ 160 register unsigned int _t0 asm("$8"); \
161 register unsigned int _fn asm("t1"); \ 161 register unsigned int _fn asm("$25"); \
162 register unsigned int _tls asm("v1"); \ 162 register unsigned int _tls asm("$3"); \
163 asm volatile( \ 163 asm volatile( \
164 ".set push\n\t" \ 164 ".set push\n\t" \
165 ".set noreorder\n\t" \ 165 ".set noreorder\n\t" \
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp
index dfd19f209..40555d735 100644
--- a/opengl/libs/GLES2/gl2.cpp
+++ b/opengl/libs/GLES2/gl2.cpp
@@ -123,10 +123,10 @@ using namespace android;
123 #define API_ENTRY(_api) __attribute__((noinline)) _api 123 #define API_ENTRY(_api) __attribute__((noinline)) _api
124 124
125 #define CALL_GL_API(_api, ...) \ 125 #define CALL_GL_API(_api, ...) \
126 register unsigned long _t0 asm("t0"); \ 126 register unsigned long _t0 asm("$12"); \
127 register unsigned long _fn asm("t9"); \ 127 register unsigned long _fn asm("$25"); \
128 register unsigned long _tls asm("v1"); \ 128 register unsigned long _tls asm("$3"); \
129 register unsigned long _v0 asm("v0"); \ 129 register unsigned long _v0 asm("$2"); \
130 asm volatile( \ 130 asm volatile( \
131 ".set push\n\t" \ 131 ".set push\n\t" \
132 ".set noreorder\n\t" \ 132 ".set noreorder\n\t" \
@@ -156,10 +156,10 @@ using namespace android;
156 #define API_ENTRY(_api) __attribute__((noinline)) _api 156 #define API_ENTRY(_api) __attribute__((noinline)) _api
157 157
158 #define CALL_GL_API(_api, ...) \ 158 #define CALL_GL_API(_api, ...) \
159 register unsigned int _t0 asm("t0"); \ 159 register unsigned int _t0 asm("$8"); \
160 register unsigned int _fn asm("t9"); \ 160 register unsigned int _fn asm("$25"); \
161 register unsigned int _tls asm("v1"); \ 161 register unsigned int _tls asm("$3"); \
162 register unsigned int _v0 asm("v0"); \ 162 register unsigned int _v0 asm("$2"); \
163 asm volatile( \ 163 asm volatile( \
164 ".set push\n\t" \ 164 ".set push\n\t" \
165 ".set noreorder\n\t" \ 165 ".set noreorder\n\t" \
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
index 1297ac47a..0b309566c 100644
--- a/opengl/libs/GLES_CM/gl.cpp
+++ b/opengl/libs/GLES_CM/gl.cpp
@@ -179,10 +179,10 @@ GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
179 #define API_ENTRY(_api) __attribute__((noinline)) _api 179 #define API_ENTRY(_api) __attribute__((noinline)) _api
180 180
181 #define CALL_GL_API(_api, ...) \ 181 #define CALL_GL_API(_api, ...) \
182 register unsigned long _t0 asm("t0"); \ 182 register unsigned long _t0 asm("$12"); \
183 register unsigned long _fn asm("t9"); \ 183 register unsigned long _fn asm("$25"); \
184 register unsigned long _tls asm("v1"); \ 184 register unsigned long _tls asm("$3"); \
185 register unsigned long _v0 asm("v0"); \ 185 register unsigned long _v0 asm("$2"); \
186 asm volatile( \ 186 asm volatile( \
187 ".set push\n\t" \ 187 ".set push\n\t" \
188 ".set noreorder\n\t" \ 188 ".set noreorder\n\t" \
@@ -212,10 +212,10 @@ GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
212 #define API_ENTRY(_api) __attribute__((noinline)) _api 212 #define API_ENTRY(_api) __attribute__((noinline)) _api
213 213
214 #define CALL_GL_API(_api, ...) \ 214 #define CALL_GL_API(_api, ...) \
215 register unsigned int _t0 asm("t0"); \ 215 register unsigned int _t0 asm("$8"); \
216 register unsigned int _fn asm("t9"); \ 216 register unsigned int _fn asm("$25"); \
217 register unsigned int _tls asm("v1"); \ 217 register unsigned int _tls asm("$3"); \
218 register unsigned int _v0 asm("v0"); \ 218 register unsigned int _v0 asm("$2"); \
219 asm volatile( \ 219 asm volatile( \
220 ".set push\n\t" \ 220 ".set push\n\t" \
221 ".set noreorder\n\t" \ 221 ".set noreorder\n\t" \