bitops.h: Add functions to extract and deposit bitfields
Add functions deposit32(), deposit64(), extract32() and extract64() to extract and deposit bitfields in 32 and 64 bit words. Based on ideas by Jia Liu and Avi Kivity. Suggested-by: NJia Liu <proljc@gmail.com> Suggested-by: NAvi Kivity <avi@redhat.com> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
Showing
想要评论请 注册 或 登录