Rotate, mask insert flags
This instruction performs a rotation right of a value held in a general-purpose register by an immediate value, and then inserts a selection of the bottom four bits of the result of the rotation into the PSTATE flags, under the control of a second immediate mask.
Variants: FEAT_FlagM (ARMv8.4)
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | |||||||||||||||
sf | op | S | imm6 | Rn | o2 | mask |
---|
if !IsFeatureImplemented(FEAT_FlagM) then EndOfDecode(Decode_UNDEF); constant integer imm = UInt(imm6); constant bits(4) flagmask = mask; constant integer n = UInt(Rn);
constant bits(64) reg = X[n, 64]; constant bits(4) flags = (reg:reg); if flagmask<3> == '1' then PSTATE.N = flags<3>; if flagmask<2> == '1' then PSTATE.Z = flags<2>; if flagmask<1> == '1' then PSTATE.C = flags<1>; if flagmask<0> == '1' then PSTATE.V = flags<0>;
If PSTATE.DIT is 1: