Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mfdcr/mtdcr



Jachym Holecek wrote:
> Hello,
> 
> 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.  ({}) should not be used
in NetBSD.  Use uint*_t, not u_int32_t.

-- 
Matt Thomas                     email: matt%3am-software.com@localhost
3am Software Foundry              www: http://3am-software.com/bio/matt/
Cupertino, CA              disclaimer: I avow all knowledge of this message.



Home | Main Index | Thread Index | Old Index