]> The Tcpdump Group git mirrors - libpcap/commit
Use common code for handling absolute offsets.
authorGuy Harris <[email protected]>
Mon, 9 Feb 2015 02:01:44 +0000 (18:01 -0800)
committerGuy Harris <[email protected]>
Mon, 9 Feb 2015 02:01:44 +0000 (18:01 -0800)
commit3102d0ef66691293a3910581d11912a15fdd251a
treeb577a959cef5f6363883e8952d0d85f6b64fc23e
parent91885dbd359687577157ca07c7e43aca6ab16da5
Use common code for handling absolute offsets.

Define a structure that, for absolute offsets, has a Boolean flag
indicating whether the offset has a variable part, the constant part of
the offset, and the register, if any, holding the variable part of the
offset.  Have a routine that either generates code to load the X
register with the variable part of the offset or generates no code, and
use that instead of the existing routines for specific offsets.

Use instances of that structure instead of individual variables.

Add a macro to save the current link-layer header absolute offset and
set it to a new value.
gencode.c