« Previous | Next » 

Revision 2dc6bebd

ID2dc6bebde93677b262caff114849d0f5ebdaa82d

Added by Peter Maydell almost 11 years ago

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 <>
Reviewed-by: Richard Henderson <>
Message-id:
Signed-off-by: Anthony Liguori <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences