Browse code

ARM: add explicit .arch and .fpu directives to asm.S

This prevents build errors when compiler and assembler default
targets differ. Ideally each file would declare the highest
level it requires. This is however not easily possible as it
complicates assembling pre-armv6t2 code in Thumb-2 mode.

HAVE_NEON is used as indicator for ARMv7-A since no other
symbol exists for this and NEON is only available in this
variant.

Signed-off-by: Mans Rullgard <mans@mansr.com>

Mans Rullgard authored on 2011/11/15 10:15:52
Showing 1 changed files
... ...
@@ -34,6 +34,22 @@
34 34
 #   define T @
35 35
 #endif
36 36
 
37
+#if   HAVE_NEON
38
+        .arch           armv7-a
39
+#elif HAVE_ARMV6T2
40
+        .arch           armv6t2
41
+#elif HAVE_ARMV6
42
+        .arch           armv6
43
+#elif HAVE_ARMV5TE
44
+        .arch           armv5te
45
+#endif
46
+
47
+#if   HAVE_NEON
48
+        .fpu            neon
49
+#elif HAVE_ARMVFP
50
+        .fpu            vfp
51
+#endif
52
+
37 53
         .syntax unified
38 54
 T       .thumb
39 55