]> Git Repo - qemu.git/commit
bitops: Provide sextract32() and sextract64()
authorPeter Maydell <[email protected]>
Fri, 28 Jun 2013 11:40:31 +0000 (12:40 +0100)
committerAnthony Liguori <[email protected]>
Mon, 22 Jul 2013 20:41:11 +0000 (15:41 -0500)
commit2dc6bebde93677b262caff114849d0f5ebdaa82d
treea38c249fcd1c3d3c02da43066f13e5660e049e9a
parentfd1d9926e91f421bc851f9dd19875f14799c6e4b
bitops: Provide sextract32() and sextract64()

A common operation in instruction decoding is to take a field
from an instruction that represents a signed integer in some
arbitrary number of bits, and sign extend it into a C signed
integer type for manipulation. Provide new functions sextract32()
and sextract64() which perform this operation; they are like
the existing extract32() and extract64() except that the field
is sign-extended into the returned result.

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: 1372419632[email protected]
Signed-off-by: Anthony Liguori <[email protected]>
include/qemu/bitops.h
This page took 0.024005 seconds and 4 git commands to generate.