Re: [PATCH] KVM: PPC: elide struct thread_struct instances from stack

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

 



On 01.06.2010, at 00:40, Paul Mackerras wrote:

> On Mon, May 31, 2010 at 09:59:13PM +0200, Andreas Schwab wrote:
> 
>> Instead of instantiating a whole thread_struct on the stack use only the
>> required parts of it.
> 
> ...
> 
>> +_GLOBAL(kvm_cvt_fd)
>> +	lfd	0,0(r5)			/* load up fpscr value */
>> +	MTFSF_L(0)
>> +	lfs	0,0(r3)
>> +	stfd	0,0(r4)
>> +	mffs	0
>> +	stfd	0,0(r5)			/* save new fpscr value */
>> +	blr
>> +
>> +_GLOBAL(kvm_cvt_df)
>> +	lfd	0,0(r5)			/* load up fpscr value */
>> +	MTFSF_L(0)
>> +	lfd	0,0(r3)
>> +	stfs	0,0(r4)
>> +	mffs	0
>> +	stfd	0,0(r5)			/* save new fpscr value */
>> +	blr
> 
> I re-read the relevant part of the PowerPC architecture spec
> yesterday, and it seems pretty clear that the FPSCR doesn't affect the
> behaviour of lfs and stfs, and is not affected by them.  So in fact 4
> out of the 7 instructions in each of those procedures are unnecessary
> (and similarly for the cvt_fd/df used in the alignment fixup code).

So the rounding control field is not used on lfs? Interesting. I couldn't find a reference to it being used or modified either though.

Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux