lkml.org 
[lkml]   [2022]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2] hwmon: (dell-smm) Improve assembly code
Date
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)
\
 
 \ /
  Last update: 2022-02-20 19:04    [W:0.196 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site