Using and Porting GNU CC
Special expression codes exist to represent bitfield instructions. These types of expressions are lvalues in RTL; they may appear on the left side of an assignment, indicating insertion of a value into the specified bit field.
(sign_extract:m loc size pos)
BITS_BIG_ENDIANsays which end of the memory unit pos counts from.
If loc is in memory, its mode must be a single-byte integer mode.
If loc is in a register, the mode to use is specified by the
operand of the
(see Standard Names) and is usually a full-word integer mode.
The mode of pos is machine-specific and is also specified
The mode m is the same as the mode that would be used for loc if it were a register.
(zero_extract:m loc size pos)
sign_extractbut refers to an unsigned or zero-extended bit field. The same sequence of bits are extracted, but they are filled to an entire word with zeros instead of by sign-extension.