Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1242263 > unrolled thread

Re: [PATCH] x86, bitops, variable_test_bit should return 1 not -1 on a match

Started byPrarit Bhargava <prarit@redhat.com>
First post2015-10-08 13:50 +0200
Last post2015-10-08 13:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] x86, bitops, variable_test_bit should return 1 not -1  on a match Prarit Bhargava <prarit@redhat.com> - 2015-10-08 13:50 +0200

#1242263 — Re: [PATCH] x86, bitops, variable_test_bit should return 1 not -1 on a match

FromPrarit Bhargava <prarit@redhat.com>
Date2015-10-08 13:50 +0200
SubjectRe: [PATCH] x86, bitops, variable_test_bit should return 1 not -1 on a match
Message-ID<qhhRU-2oG-13@gated-at.bofh.it>

On 08/21/2015 04:08 AM, H. Peter Anvin wrote:
> Wrong fix, though.  Instead we should change it to use the set instruction, which would also make it easier to use the CC_SET/CC_OUT proposed macros to use assembly out in the future.
> 
> The downside with set is that it only sets a single byte, the upside is that it always outputs 0 or 1, and apparently if the output variable is your bool gcc can use that for optimization.
> 

hpa, I didn't realize your comment was suggesting a change.  I've done a google
search on "gcc bool optimization" (and various incantations of that) and didn't
find anything that lead me in the direction of making a change.  Could you
elaborate on what the issue is?

Thanks,

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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web