Subject: Re: mfdcr/mtdcr
To: Matt Thomas <matt@3am-software.com>
From: Jachym Holecek <freza@dspfpga.com>
List: port-powerpc
Date: 05/10/2006 04:23:41
# Matt Thomas 2006-05-10:
> Jachym Holecek wrote:
> > I'd like to move mfdcr()/mtdcr() macro definitions into a separate file.
> > Motivation:
> > 
> >   * Currently, they're defined multiple times in include/ibm4xx/dcr40*.h
> > 
> >   * For evbppc/virtex, I'd like to be able to access DCR without
> >     also pulling in irrelevant address definitions (DCR address
> >     layout is completely up to the HDL designer)
> > 
> > The diff below (relative to arch/powerpc/include/ibm4xx) creates dcr.h
> > and makes dcr40*.h use it. Other option would be to move the macros to
> > ibm4xx/cpu.h (the m{f,t}dcr instructions are 4xx specific).
> > 
> > Does it sound OK? If so, anyone wants to commit? ;-)
> 
> They should be static inline, not gcc macros.

Will this work given that the address parameter _needs_ to be a
compile-time constant? (it's encoded as immediate operand)

> ({}) should not be used in NetBSD.  Use uint*_t, not u_int32_t.

OK.

	-- Jachym