SETF8, SETF16

Evaluation of 8-bit or 16-bit flag values

This instruction sets the PSTATE.NZV flags based on the value in the specified general-purpose register. SETF8 treats the value as an 8-bit value. SETF16 treats the value as a 16-bit value.

The PSTATE.C flag is not affected by these instructions.

Encoding: Integer

Variants: FEAT_FlagM (ARMv8.4)

313029282726252423222120191817161514131211109876543210
00111010000000000001001101
sfopSopcode2szRno3mask

SETF8 (sz == 0)

SETF8 <Wn>

SETF16 (sz == 1)

SETF16 <Wn>

Decoding algorithm

if !IsFeatureImplemented(FEAT_FlagM) then EndOfDecode(Decode_UNDEF);
constant integer size = 8 << UInt(sz);
constant integer n = UInt(Rn);

Operation

constant bits(32) reg = X[n, 32];
PSTATE.N = reg;
PSTATE.Z = if (reg == Zeros(size)) then '1' else '0';
PSTATE.V = reg EOR reg;
//PSTATE.C unchanged;

Explanations

<Wn>: Is the 32-bit name of the general-purpose source register, encoded in the "Rn" field.

Operational Notes

If PSTATE.DIT is 1: