]> Kevux Git Server - fll/commit
Update: Optimize bitwise logic regarding removing bits.
authorKevin Day <thekevinday@gmail.com>
Wed, 3 Jan 2024 23:25:37 +0000 (17:25 -0600)
committerKevin Day <thekevinday@gmail.com>
Wed, 3 Jan 2024 23:25:37 +0000 (17:25 -0600)
commit8c0da7bf799c37e6ceeb3d9c94d6622bbb0dd767
treed549ff0653edd8bf56afffdbdcce632d58e6dabe
parent85eacaaaf09e9266226ea98a0f327f33fbc8dfeb
Update: Optimize bitwise logic regarding removing bits.

I intended to eventually do this and I finally got around to it.
Change the logic to use "x &= ~y" rather than "x -= x & y" or "if (x | y) x -= y".

In the case of "x -= x & y", the resulting object code is identical in my tests.
However, the code is simpler to write with the "x &= ~y".

The "if (x | y) x -= y" results in a lot more commands in the object.
21 files changed:
level_0/f_file/c/file.c
level_1/fl_conversion/c/private-conversion.c
level_3/byte_dump/c/main/common.c
level_3/control/c/main/common.c
level_3/controller/c/common.c
level_3/controller/c/controller.c
level_3/controller/c/entry/private-entry.c
level_3/controller/c/rule/private-rule.c
level_3/fake/c/main/common.c
level_3/firewall/c/common.c
level_3/fss_identify/c/main/common.c
level_3/fss_read/c/main/common.c
level_3/fss_read/c/main/main.c
level_3/fss_write/c/main/common.c
level_3/fss_write/c/main/fss_write.c
level_3/fss_write/c/main/main.c
level_3/fss_write/c/payload/fss_write.c
level_3/iki_read/c/main/common.c
level_3/iki_write/c/main/common.c
level_3/status_code/c/main/common.c
level_3/utf8/c/main/common.c