summaryrefslogtreecommitdiffstats
path: root/libpixelflinger
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2019-02-14 11:54:10 -0800
committerPirama Arumuga Nainar <pirama@google.com>2019-02-14 11:59:48 -0800
commit5d88cef82bbf210ac6e371a3c2128e482e7314c8 (patch)
tree4a0ff86a13c61b568c421c85c5d251700358da34 /libpixelflinger
parentda20bc763e70a89cb376941f108bc26b393d53dc (diff)
downloadsystem_core-5d88cef82bbf210ac6e371a3c2128e482e7314c8.tar.gz
system_core-5d88cef82bbf210ac6e371a3c2128e482e7314c8.tar.bz2
system_core-5d88cef82bbf210ac6e371a3c2128e482e7314c8.zip
Mark gglMulx and gglMulAddx as always_inline
Bug: http://b/116873221 Bug: http://b/124451159 This is to get them building with O0 (needed for coverage builds). At O0, without the always_inline, the compiler is not able to reconcile the constraints in the inline assembly. In file included from system/core/libpixelflinger/trap.cpp:27: In file included from system/core/libpixelflinger/trap.h:22: In file included from system/core/libpixelflinger/include/private/pixelflinger/ggl_context.h:27: system/core/libpixelflinger/include/private/pixelflinger/ggl_fixed.h:113:9: error: invalid operand for inline asm constraint 'I' asm("smull %[lo], %[hi], %[x], %[y] \n" ^ system/core/libpixelflinger/include/private/pixelflinger/ggl_fixed.h:136:9: error: invalid operand for inline asm constraint 'I' asm("smull %[lo], %[hi], %[x], %[y] \n" ^ 2 errors generated. Test: m NATIVE_COVERAGE=true COVERAGE_PATHS=system/core/libpixelflinger Test: m Change-Id: Ia4516b19b957687b5fa25d2d100679abcec29366
Diffstat (limited to 'libpixelflinger')
-rw-r--r--libpixelflinger/include/private/pixelflinger/ggl_fixed.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpixelflinger/include/private/pixelflinger/ggl_fixed.h b/libpixelflinger/include/private/pixelflinger/ggl_fixed.h
index 7f39e9b97..4217a8997 100644
--- a/libpixelflinger/include/private/pixelflinger/ggl_fixed.h
+++ b/libpixelflinger/include/private/pixelflinger/ggl_fixed.h
@@ -107,7 +107,7 @@ int32_t gglRecip28(GGLfixed x) {
// inline ARM implementations
inline GGLfixed gglMulx(GGLfixed x, GGLfixed y, int shift) CONST;
-inline GGLfixed gglMulx(GGLfixed x, GGLfixed y, int shift) {
+__attribute__((always_inline)) inline GGLfixed gglMulx(GGLfixed x, GGLfixed y, int shift) {
GGLfixed result, t;
if (__builtin_constant_p(shift)) {
asm("smull %[lo], %[hi], %[x], %[y] \n"
@@ -130,7 +130,8 @@ inline GGLfixed gglMulx(GGLfixed x, GGLfixed y, int shift) {
}
inline GGLfixed gglMulAddx(GGLfixed x, GGLfixed y, GGLfixed a, int shift) CONST;
-inline GGLfixed gglMulAddx(GGLfixed x, GGLfixed y, GGLfixed a, int shift) {
+__attribute__((always_inline)) inline GGLfixed gglMulAddx(GGLfixed x, GGLfixed y, GGLfixed a,
+ int shift) {
GGLfixed result, t;
if (__builtin_constant_p(shift)) {
asm("smull %[lo], %[hi], %[x], %[y] \n"