Hi,

this does clutter my diffs, and the XXX comment is correct,
currently used _C_LABEL() is nothing, and i find it's usage
directly rather pointless/weird, this does atleast make x .globl,
so there is benefit to the added characters in written code
be it _C_LABEL() or C_OBJECT() instead of just the label, that
i personally prefer, but given wide use of _C_LABEL() i thought
this might want fixing so i wont get told to use _C_LABEL() or
anything for my diffs...

here is define for _C_LABEL:
#define _C_LABEL(x)     x

_C_LABEL() is used over 60 times in sys/arch/arm/arm/*.S atm.
(C_OBJECT() only 4 times under the #define.
if this goes in, there miight be easy cleanup to be done for
anyone who does care. there might be even unused variables around:)

-Artturi


diff --git a/sys/arch/arm/arm/cpufunc_asm_armv7.S 
b/sys/arch/arm/arm/cpufunc_asm_armv7.S
index 05679df15fa..7b71652c4dc 100644
--- a/sys/arch/arm/arm/cpufunc_asm_armv7.S
+++ b/sys/arch/arm/arm/cpufunc_asm_armv7.S
@@ -234,10 +234,6 @@ ENTRY(armv7_context_switch)
        isb     sy
        mov     pc, lr
 
-/* XXX The following macros should probably be moved to asm.h */
-#define _DATA_OBJECT(x) .globl x; .type x,_ASM_TYPE_OBJECT; x:
-#define C_OBJECT(x)    _DATA_OBJECT(_C_LABEL(x))
-
        .align 2
 C_OBJECT(armv7_dcache_sets_max)
        .word   0
diff --git a/sys/arch/arm/include/asm.h b/sys/arch/arm/include/asm.h
index e1e5bbc4dd2..7f9af03c7a5 100644
--- a/sys/arch/arm/include/asm.h
+++ b/sys/arch/arm/include/asm.h
@@ -64,6 +64,9 @@
 #define _ENTRY(x) \
        .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x:
 
+#define _DATA_OBJECT(x) .globl x; .type x,_ASM_TYPE_OBJECT; x:
+#define C_OBJECT(x)    _DATA_OBJECT(_C_LABEL(x))
+
 #if defined(PROF) || defined(GPROF)
 # define _PROF_PROLOGUE        \
        mov ip, lr; bl __mcount

Reply via email to