Thread (106 messages) 106 messages, 10 authors, 2008-06-26

Re: [PATCH 5/9] powerpc: Introduce VSX thread_struct and CONFIG_VSX

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2008-06-19 09:33:52

On Thu, 2008-06-19 at 01:10 -0500, Kumar Gala wrote:
quoted
I still think using the union makes it is easier to read than what you
have here.  Also, it better reflects the structure of what's being
stored there.
I don't think that holds much weight with me.  We don't union the  
vector128 type to show it also supports float, u16, and u8 types.
But this is different. The same registers are either basic FP regs or 
full VSX regs.

I don't see what's wrong with union, it's a nice way to express things.
 
I stick by the fact that the ONLY place it looks like you access the  
union via the .vsr member is for memset or memcpy so you clearly know  
if the size should be sizeof(double) or sizeof(vector).

Also, I can see the case in the future that 'fpr's become 
What's wrong with the union ? there's nothing ugly about them..

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help