[arm] Use a direct branch in the krait workaround to avoid clang generating extra...
authorZoltan Varga <vargaz@gmail.com>
Wed, 13 Apr 2016 20:28:14 +0000 (16:28 -0400)
committerZoltan Varga <vargaz@gmail.com>
Wed, 13 Apr 2016 20:28:21 +0000 (16:28 -0400)
mono/utils/mono-signal-handler.h

index 9e0b072a1a5e7b6659f2c9f8f83a3e0618a6db6d..68fa0ad5f62312b1e11de46d1b92e073f9eeab03 100644 (file)
                              "mov r0, r0\n\t"                          \
                              "mov r0, r0\n\t"                          \
                              "mov r0, r0\n\t"                          \
-                             "mov r0, r0\n\t");                        \
-               asm volatile (                                          \
-                             "bx %0"                                   \
-                             : : "r" (__krait_ ## name));              \
+                             "mov r0, r0\n\t"                          \
+                                 "b __krait_" # name                   \
+                                 "\n\t");                                              \
        }       \
-       static void __krait_ ## name arglist
+       static __attribute__((used)) void __krait_ ## name arglist
 #endif
 
-
 /* Don't use this */
 #ifndef MONO_SIGNAL_HANDLER_FUNC
 #define MONO_SIGNAL_HANDLER_FUNC(access, name, arglist) access void name arglist