OSDN Git Service

ART: Fix arm32 assembly for Clang
authorChih-Hung Hsieh <chh@google.com>
Mon, 27 Jul 2015 17:10:44 +0000 (10:10 -0700)
committerAndreas Gampe <agampe@google.com>
Tue, 4 Aug 2015 15:15:38 +0000 (08:15 -0700)
Clang ignores .thumb_func and requires an explicit
.thumb directive, as given by the ARM Unified Assembler
Language. Conditionally add .thumb to thumb2 functions.

Bug: 22762844
Change-Id: I08abdb5f4e0ba5135d4ed850ca3e284203f95a03

runtime/arch/arm/asm_support_arm.S

index 665d2a3..44c7649 100644 (file)
 // generated at END.
 .macro DEF_ENTRY thumb_or_arm, name
     \thumb_or_arm
+// Clang ignores .thumb_func and requires an explicit .thumb. Investigate whether we should still
+// carry around the .thumb_func.
+    .ifc \thumb_or_arm, .thumb_func
+        .thumb
+    .endif
     .type \name, #function
     .hidden \name  // Hide this as a global symbol, so we do not incur plt calls.
     .global \name