← Home

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.

Integer class

(FEAT_FlagM)

313029282726252423222120191817161514131211109876543210
00111010000000000sz0010Rn01101
sfopSopcode2o3mask

SETF8 encoding

(sz == 0)

SETF8 <Wn>

SETF16 encoding

(sz == 1)

SETF16 <Wn>

Decode (all encodings)

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

Assembler Symbols

<Wn>

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

Operation

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

Operational information

This instruction is a data-independent-time instruction as described in About PSTATE.DIT.


Version 2025.09 — Copyright © 2010-2025 Arm Limited or its affiliates.

This site is provided as a community resource and is NOT affiliated with nor endorsed by Arm Limited.