Module Arm64_ast.Logical_immediates
Recognition and encoding of logical immediate arguments for ARM64
is_logical_immediate x returns true if x is a valid logical immediate for ARM64 instructions. A valid logical immediate is:
- neither
0nor-1; - composed of a repetition
BBBBBof a bit-patternBof lengthe - the low
ebits of the number, that is,B, match0+1+0*or1+0+1*.
val encode_logical_immediate_fields : nativeint -> encoded_logical_immediateencode_logical_immediate_fields x encodes a logical immediate into (N, immr, imms) fields for ARM64 instructions. Raises a fatal error if x is not a valid logical immediate.