On Wed, Jul 12, 2017 at 06:12:34PM +0200, Mark Kettenis wrote:
> > Date: Mon, 10 Jul 2017 23:18:59 +0300
> > From: Artturi Alm <artturi....@gmail.com>
> > 
> > Hi,
> > 
> > this does clutter my diffs, and the XXX comment is correct,
> 
> It probably isn't. None of the other architectures have those macros
> in their <machine/asm.h>.
> 

Ok, didn't consider that, you're right and the diff withdrawn, but anyway,
what i was imprecisely after was that i'd prefer
having something like RODATA(name) found from sparc64/include/asm.h,
instead of the useless _C_LABEL() to use in armv7 md .S assembly, and
just because of the weird name i didn't find intuitive enough, i didn't
even suggest the arm64 EENTRY()..
Don't get me wrong, i'm more than happy to drop all the labeling
macros out of my diffs, and choose my self what is global and what is not,
while it's against the minimalism i'm now aiming at to even get the diffs
read&commented when freetime&interest does meet:)

-Artturi

> > 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