Skip to content

WIP/RFC possible use of va_list in gencode.c#1520

Closed
infrastation wants to merge 1 commit intothe-tcpdump-group:masterfrom
infrastation:wip_va
Closed

WIP/RFC possible use of va_list in gencode.c#1520
infrastation wants to merge 1 commit intothe-tcpdump-group:masterfrom
infrastation:wip_va

Conversation

@infrastation
Copy link
Member

This is another unfinished piece that didn't quite work out the way I originally expected, but took some time to produce anyway. Potentially this could be developed further, please have a look when you have time.

This is one of the optimizations that avoid generating duplicate instructions in the first place. On this occasion it is the code produced by a series of ORed gen_cmp() calls, all of which load the same exact packet data, in which case, obviously, only the first load is required. The draft demonstrates how this can be done for PPP, ATM and ARCnet (the tests pass), all of which hard-code the values.

@infrastation infrastation marked this pull request as draft May 22, 2025 20:37
@infrastation
Copy link
Member Author

This minor optimisation method would require more work to become useful, and there is no time for that, so let's close it until time is good to retry.

@infrastation infrastation deleted the wip_va branch March 6, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant