OSDN Git Service

[MIPS] Fix mips32r1 build
authorDuane Sand <duane.sand@imgtec.com>
Tue, 3 Feb 2015 00:54:15 +0000 (16:54 -0800)
committerDuane Sand <duane.sand@imgtec.com>
Tue, 3 Feb 2015 00:54:15 +0000 (16:54 -0800)
Fix regression from 6701fbe5f0d799c5245b0cdf3a69ecdcbfd9fb08 .
The rdhwr instruction is unsupported by mips32r1 cpus, but is
supported via kernel emulation on those cpus.

Change-Id: Ieb3343fff0f0da54003044f451c90e1c761208eb

opengl/libs/EGL/getProcAddress.cpp
opengl/libs/GLES2/gl2.cpp
opengl/libs/GLES_CM/gl.cpp

index 2b2b227..660af33 100644 (file)
@@ -163,6 +163,7 @@ namespace android {
             asm volatile(                                           \
                 ".set  push\n\t"                                    \
                 ".set  noreorder\n\t"                               \
+                ".set  mips32r2\n\t"                                \
                 "rdhwr %[tls], $29\n\t"                             \
                 "lw    %[t0], %[OPENGL_API](%[tls])\n\t"            \
                 "beqz  %[t0], 1f\n\t"                               \
index 40555d7..d5dc012 100644 (file)
@@ -163,6 +163,7 @@ using namespace android;
         asm volatile(                                            \
             ".set  push\n\t"                                     \
             ".set  noreorder\n\t"                                \
+            ".set  mips32r2\n\t"                                 \
             "rdhwr %[tls], $29\n\t"                              \
             "lw    %[t0], %[OPENGL_API](%[tls])\n\t"             \
             "beqz  %[t0], 1f\n\t"                                \
index 0b30956..b1b31f8 100644 (file)
@@ -219,6 +219,7 @@ GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
         asm volatile(                                            \
             ".set  push\n\t"                                     \
             ".set  noreorder\n\t"                                \
+            ".set  mips32r2\n\t"                                 \
             "rdhwr %[tls], $29\n\t"                              \
             "lw    %[t0], %[OPENGL_API](%[tls])\n\t"             \
             "beqz  %[t0], 1f\n\t"                                \