-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
fix(menu): larger bitfield for enum value needed on Windows #8965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(menu): larger bitfield for enum value needed on Windows #8965
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
|
Hi 👋, thank you for your PR! We've run benchmarks in an emulated environment. Here are the results: ARM Emulated 32b - lv_conf_perf32b
Detailed Results Per Scene
ARM Emulated 64b - lv_conf_perf64b
Detailed Results Per Scene
Disclaimer: These benchmarks were run in an emulated environment using QEMU with instruction counting mode. 🤖 This comment was automatically generated by a bot. |
|
I just found another one with a little help from the JSON API generator. Maybe we should make a CI for it. import json
with open("header.json") as f:
j = json.load(f)
enum_required_bit_widths = {
enum["name"]: (len(enum["members"]) - 1).bit_length() + 1
for enum in j["enums"]
}
for struct in j["structures"]:
for field in struct["fields"]:
field_bitsize = field["bitsize"]
# is this field a bitfield?
if field_bitsize is None:
continue
field_bitsize = int(field_bitsize)
field_type = field["type"]
field_type_name = field_type["name"]
# is this field an enum?
if field_type_name not in enum_required_bit_widths:
continue
needed_bitsize = enum_required_bit_widths[field_type_name]
msg = f"{struct['name']}::{field['name']} has {field_bitsize}, needs {needed_bitsize}"
if field_bitsize < needed_bitsize:
print(f"{msg} <- bad size")
else:
print(msg) |
Agreed! |
Fixes #8811
Notes
lv_conf_template.hrun lv_conf_internal_gen.py and update Kconfig.scripts/code-format.py(astyle v3.4.12needs to installed by runningcd scripts; ./install_astyle.sh) and follow the Code Conventions.