Subject: Re: question on inline assembly and long long values

From: Chris Friesen <[email-masked]>
Date: Wed, 06 Apr 2005 15:37:33 -0600

Gabriel Paubert wrote:
> On Wed, Apr 06, 2005 at 02:01:20PM -0600, Chris Friesen wrote:

>>static inline unsigned long long getmsr()
>>{
>>	unsigned long long val;
>>        asm volatile( \
>>                "mfmsr  %L0               \n\t" \
>>                "rldicl %0,%L0,32,32       \n\t" \
>>                "rldicl %L0,%L0,0,32        \n\t" \
>>                : "=r" (val));
>>	return val;
>>}

> If you are running in 32 bit mode, you don't need
> to clear the upper half of %L0.

Thanks for the tip.  That cuts out another instruction.

Chris