lkml.org 
[lkml]   [2017]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/alternatives: Fix alt_max_short macro to really be a max()
Hi,

On Thu, 5 Oct 2017, Borislav Petkov wrote:

> On Thu, Oct 05, 2017 at 02:35:33PM +0200, Mathias Krause wrote:
> > Note the "<"! ...comment is wrong, though the implementation works!
>
> I know, I realized that when I looked at alternative-asm.h. Wanted to
> double-check it with Micha first.

Yeah, for bit-twiddling the result of arithmetic would need to be
booleanized first, or alternatively the boolean operators be used in the
first place. So if '<' works then that's better in this context.

(In a different context, or in the same one there definitely was a problem
with using '<', but I can't remember the details, it's too long ago we
discussed about this; maybe it even was a problem only with some binutils
versions. So I'd suggest using the more obvious way until problems
reoccur, and then document why exactly using relational ops was a problem
;-) )


Ciao,
Michael.

\
 
 \ /
  Last update: 2017-10-05 14:53    [W:0.045 / U:4.908 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site