Skip to content

Discussion: Feature IFDEFs and unions/bitfields in public API structs #280

@flobernd

Description

@flobernd

Our internal structs are using IFDEFs to enable/disable feature specific fields on deman (e.g. AVX-512 related fiels). As well, bitfields are used to optimize struct sizes.

While bindings prevents us to do the same optimizations for the public API structs, we could introduce a new ZYDIS_SIZE_OPTIMIZED_UNSAFE_FOR_BINDINGS CMake option (naming open for discussion as well).

This option would indicate that Zydis is used in a pure C/C++ project and always built on demand (-> we know the feature defines of headers and code files are the same; this is the essential part!). This would allow us to e.g. change the ZydisDecodedOperand struct to union or to introduce bitfields in the public API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-buildArea: Build systemC-enhancementCategory: Enhancement of existing features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions