[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <075c56861e1e454188db1088b78d3ee2@AcuMS.aculab.com>
Date: Sun, 20 Feb 2022 18:03:15 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Guenter Roeck' <linux@...ck-us.net>,
'Armin Wolf' <W_Armin@....de>,
"pali@...nel.org" <pali@...nel.org>
CC: "jdelvare@...e.com" <jdelvare@...e.com>,
"linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
"linux-assembly@...r.kernel.org" <linux-assembly@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2] hwmon: (dell-smm) Improve assembly code
From: Guenter Roeck
> Sent: 20 February 2022 15:30
>
> On 2/20/22 04:20, David Laight wrote:
> > From: Armin Wolf
> >> Sent: 19 February 2022 21:10
> >>
> >> The new assembly code works on both 32 bit and 64 bit
> >> cpus and allows for more compiler optimisations by not
> >> requiring smm_regs to be packed. Also since the
> >> SMM handler seems to modify the carry flag, the new
> >> code informs the compiler that the flags register
> >> needs to be saved/restored. Since clang runs out of
> >> registers on 32 bit x86 when using CC_OUT, we need
> >> to execute "setc" ourself.
> >
> > You always need to save anything from the flags register
> > inside the asm block - it is never valit afterwards.
> >
>
> Does that matter here ? I thought setcc is used to get the carry flag.
The code is ok, just the comment is not really right.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists