Re: union/struct representations for MAS Registers

2011-08-10 Thread Kumar Gala
On Aug 10, 2011, at 12:38 PM, David Laight wrote: > >>> Bitfields are rather non-portable, the compiler has a lot of choice >>> about how to align the bits in memory. >> >> I'm ok with the masking stuff. >> However, I'm actually surprised this is true given the >> maturity of our ABIs. > > Th

RE: union/struct representations for MAS Registers

2011-08-10 Thread David Laight
> > Bitfields are rather non-portable, the compiler has a lot of choice > > about how to align the bits in memory. > > I'm ok with the masking stuff. > However, I'm actually surprised this is true given the > maturity of our ABIs. The C standard says nothing at all about how bitfields are impl

Re: union/struct representations for MAS Registers

2011-08-10 Thread Jimi Xenidis
On Aug 10, 2011, at 12:25 PM, David Laight wrote: > >> I have some and use them in some code, they represent ISA >> 2.06 MAVN=1 (version 2) >> Can I keep them? >> if so, should I put them somewhere useful to others? >> >> Examples: >> union mas1 { >> u32 _val; >> struct { >>

Re: union/struct representations for MAS Registers

2011-08-10 Thread Jimi Xenidis
On Aug 10, 2011, at 12:25 PM, Kumar Gala wrote: > > On Aug 10, 2011, at 12:21 PM, Jimi Xenidis wrote: > >> I have some and use them in some code, they represent ISA 2.06 MAVN=1 >> (version 2) >> Can I keep them? >> if so, should I put them somewhere useful to others? >> >> Examples: >> union

RE: union/struct representations for MAS Registers

2011-08-10 Thread David Laight
> I have some and use them in some code, they represent ISA > 2.06 MAVN=1 (version 2) > Can I keep them? > if so, should I put them somewhere useful to others? > > Examples: > union mas1 { > u32 _val; > struct { > u32 v:1; > u32 iprot:1; > u

Re: union/struct representations for MAS Registers

2011-08-10 Thread Kumar Gala
On Aug 10, 2011, at 12:21 PM, Jimi Xenidis wrote: > I have some and use them in some code, they represent ISA 2.06 MAVN=1 > (version 2) > Can I keep them? > if so, should I put them somewhere useful to others? > > Examples: > union mas1 { > u32 _val; > struct { > u32 v

union/struct representations for MAS Registers

2011-08-10 Thread Jimi Xenidis
I have some and use them in some code, they represent ISA 2.06 MAVN=1 (version 2) Can I keep them? if so, should I put them somewhere useful to others? Examples: union mas1 { u32 _val; struct { u32 v:1; u32 iprot:1; u32 tid:14;