lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 7 Sep 2015 16:13:49 +0200
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Christian Borntraeger <borntraeger@...ibm.com>
Cc:	Alexander Kuleshov <kuleshovmail@...il.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	linux390@...ibm.com, linux-s390@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [s390]: Use .rept directive to store/load fpu registers

On Tue, Sep 01, 2015 at 09:51:32AM +0200, Christian Borntraeger wrote:
> Am 28.08.2015 um 15:49 schrieb Alexander Kuleshov:
> >  arch/s390/kernel/swsusp.S | 49 ++++++++++++++++-------------------------------
> >  1 file changed, 17 insertions(+), 32 deletions(-)
> > 
> > diff --git a/arch/s390/kernel/swsusp.S b/arch/s390/kernel/swsusp.S
> > index ca62946..8011e14 100644
> > --- a/arch/s390/kernel/swsusp.S
> > +++ b/arch/s390/kernel/swsusp.S
> > @@ -48,22 +48,15 @@ ENTRY(swsusp_arch_suspend)
> >  	/* Store registers */
> >  	mvc	0x318(4,%r1),__SF_EMPTY(%r15)	/* move prefix to lowcore */
> >  	stfpc	0x31c(%r1)			/* store fpu control */
> > -	std	0,0x200(%r1)			/* store f0 */
> > -	std	1,0x208(%r1)			/* store f1 */
> > -	std	2,0x210(%r1)			/* store f2 */
> > -	std	3,0x218(%r1)			/* store f3 */
> > -	std	4,0x220(%r1)			/* store f4 */
> > -	std	5,0x228(%r1)			/* store f5 */
> > -	std	6,0x230(%r1)			/* store f6 */
> > -	std	7,0x238(%r1)			/* store f7 */
> > -	std	8,0x240(%r1)			/* store f8 */
> > -	std	9,0x248(%r1)			/* store f9 */
> > -	std	10,0x250(%r1)			/* store f10 */
> > -	std	11,0x258(%r1)			/* store f11 */
> > -	std	12,0x260(%r1)			/* store f12 */
> > -	std	13,0x268(%r1)			/* store f13 */
> > -	std	14,0x270(%r1)			/* store f14 */
> > -	std	15,0x278(%r1)			/* store f15 */
> > +
> > +	/* store f0..f15 floating point registers */
> > +	.set i, 0
> > +	.set f, 0x200
> > +	.rept 16
> > +	std i, f(%r1)
> > +	.set i, (i+1)
> > +	.set f, (f+0x8)
> > +	.endr
> 
> I personally find the existing code easier to read, especially as it matches the
> assembler output and I can directly where the slots are, (e.g. f11 is 0x258)

Yes, I agree with Christian. Let's keep the code as it is.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ