Compare registers and fault
This instruction compares the values in two registers, and generates a Conditional fault exception if the condition is true. This instruction does not affect the condition flags.
This instruction is used by the pseudo-instructions CFLTLE (register), CFLTLO (register), CFLTLS (register), and CFLTLT (register).
| 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 |
| sf | 1 | 1 | 1 | 0 | 1 | 1 | 0 | cc | Rm | 0 | 0 | 0 | 0 | imm2 | 1 | 0 | 0 | 0 | 0 | Rt | |||||||||||
if !IsFeatureImplemented(FEAT_CFLT) then EndOfDecode(Decode_UNDEF); end; let datasize : integer{} = 32 << UInt(sf); let t : integer = UInt(Rt); let m : integer = UInt(Rm); let reason : bits(16) = ZeroExtend{}(imm2); var cmp : CmpOp; var unsigned : boolean; case cc of when '000' => cmp = Cmp_GT; unsigned = FALSE; when '001' => cmp = Cmp_GE; unsigned = FALSE; when '010' => cmp = Cmp_GT; unsigned = TRUE; when '011' => cmp = Cmp_GE; unsigned = TRUE; when '110' => cmp = Cmp_EQ; unsigned = TRUE; when '111' => cmp = Cmp_NE; unsigned = TRUE; otherwise => EndOfDecode(Decode_UNDEF); end;
| <reason> |
Is a 2-bit unsigned immediate, in the range 0 to 3, encoded in the "imm2" field. |
| <Wt|WSP> |
Is the 32-bit name of the general-purpose register or stack pointer to be tested, encoded in the "Rt" field. |
| <Wm|WSP> |
Is the 32-bit name of the second general-purpose source register or stack pointer, encoded in the "Rm" field. |
| <Xt|SP> |
Is the 64-bit name of the general-purpose register or stack pointer to be tested, encoded in the "Rt" field. |
| <Xm|SP> |
Is the 64-bit name of the second general-purpose source register or stack pointer, encoded in the "Rm" field. |
CheckCFLTEnabled(); let operand1 : bits(datasize) = if t == 31 then SP{datasize}() else X{datasize}(t); let operand2 : bits(datasize) = if m == 31 then SP{datasize}() else X{datasize}(m); var cond : boolean; let value1 : integer = if unsigned then UInt(operand1) else SInt(operand1); let value2 : integer = if unsigned then UInt(operand2) else SInt(operand2); case cmp of when Cmp_EQ => cond = value1 == value2; when Cmp_NE => cond = value1 != value2; when Cmp_GT => cond = value1 > value2; when Cmp_GE => cond = value1 >= value2; end; if cond then let isflt : boolean = FALSE; AArch64_ConditionalFault(isflt, reason); end;
Version 2026.09 — Copyright © 2010-2026 Arm Limited or its affiliates.
This site is provided as a community resource and is NOT affiliated with nor endorsed by Arm Limited.