Re: [PATCH v5 04/14] rewrite compare_opcode() like swap_compare_opcode()

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

 



On Fri, Mar 24, 2017 at 4:14 PM, Luc Van Oostenryck
<luc.vanoostenryck@xxxxxxxxx> wrote:
> More precisely, use a table to get the opcdoe corresponding
> to the negated compare and use a more explicit name for the
> function.

Side note: this code should verify that it doesn't operate on a
floating point compare.

You can't negate a FP compare, because the negation doesn't
necessarily have the opposite value.

For example, "a < b" is *not* the same as "!(a >= b)" for floating
point values when one of them is a NaN. Both < and >= will compare as
false, so "negating" the op won't actually negate the resulting
logical operation.

             Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux