Messages in this thread | | | Date | Thu, 08 Oct 2015 07:48:34 -0400 | From | Prarit Bhargava <> | Subject | Re: [PATCH] x86, bitops, variable_test_bit should return 1 not -1 on a match |
| |
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.
| |