RE: [PATCH v2] hwmon: (dell-smm) Improve assembly code

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

 



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)




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux