;; +/- 32KiB. Used by TBZ, TBNZ.
(BRANCH_LEN_P_32KiB 32764)
(BRANCH_LEN_N_32KiB -32768)
+
+ ;; +/- 1KiB. Used by CBB<cond>, CBH<cond>, CB<cond>.
+ (BRANCH_LEN_P_1Kib 1020)
+ (BRANCH_LEN_N_1Kib -1024)
]
)
;; Conditional jumps
;; -------------------------------------------------------------------
-(define_expand "cbranch<mode>4"
+(define_expand "cbranch<GPI:mode>4"
[(set (pc) (if_then_else (match_operator 0 "aarch64_comparison_operator"
[(match_operand:GPI 1 "register_operand")
(match_operand:GPI 2 "aarch64_plus_operand")])
(pc)))]
""
{
- operands[1] = aarch64_gen_compare_reg (GET_CODE (operands[0]), operands[1],
- operands[2]);
- operands[2] = const0_rtx;
+ if (TARGET_CMPBR && aarch64_cb_rhs (GET_CODE (operands[0]), operands[2]))
+ {
+ /* The branch is supported natively. */
+ }
+ else
+ {
+ operands[1] = aarch64_gen_compare_reg (GET_CODE (operands[0]),
+ operands[1], operands[2]);
+ operands[2] = const0_rtx;
+ }
}
)
+(define_expand "cbranch<SHORT:mode>4"
+ [(set (pc) (if_then_else (match_operator 0 "aarch64_comparison_operator"
+ [(match_operand:SHORT 1 "register_operand")
+ (match_operand:SHORT 2 "aarch64_reg_or_zero")])
+ (label_ref (match_operand 3))
+ (pc)))]
+ "TARGET_CMPBR"
+ ""
+)
+
(define_expand "cbranch<mode>4"
[(set (pc) (if_then_else
(match_operator 0 "aarch64_comparison_operator"
""
)
+;; Emit a `CB<cond> (register)` or `CB<cond> (immediate)` instruction.
+;; The immediate range depends on the comparison code.
+;; Comparisons against immediates outside this range fall back to
+;; CMP + B<cond>.
+(define_insn "aarch64_cb<INT_CMP:code><GPI:mode>"
+ [(set (pc) (if_then_else (INT_CMP
+ (match_operand:GPI 0 "register_operand" "r")
+ (match_operand:GPI 1 "nonmemory_operand"
+ "r<INT_CMP:cmpbr_imm_constraint>"))
+ (label_ref (match_operand 2))
+ (pc)))]
+ "TARGET_CMPBR && aarch64_cb_rhs (<INT_CMP:CODE>, operands[1])"
+ {
+ return (get_attr_far_branch (insn) == FAR_BRANCH_NO)
+ ? "cb<INT_CMP:cmp_op>\\t%<w>0, %<w>1, %l2"
+ : aarch64_gen_far_branch (operands, 2, "L",
+ "cb<INT_CMP:inv_cmp_op>\\t%<w>0, %<w>1, ");
+ }
+ [(set_attr "type" "branch")
+ (set (attr "length")
+ (if_then_else (and (ge (minus (match_dup 2) (pc))
+ (const_int BRANCH_LEN_N_1Kib))
+ (lt (minus (match_dup 2) (pc))
+ (const_int BRANCH_LEN_P_1Kib)))
+ (const_int 4)
+ (const_int 8)))
+ (set (attr "far_branch")
+ (if_then_else (and (ge (minus (match_dup 2) (pc))
+ (const_int BRANCH_LEN_N_1Kib))
+ (lt (minus (match_dup 2) (pc))
+ (const_int BRANCH_LEN_P_1Kib)))
+ (const_string "no")
+ (const_string "yes")))]
+)
+
+;; Emit a `CBB<cond> (register)` or `CBH<cond> (register)` instruction.
+(define_insn "aarch64_cb<INT_CMP:code><SHORT:mode>"
+ [(set (pc) (if_then_else (INT_CMP
+ (match_operand:SHORT 0 "register_operand" "r")
+ (match_operand:SHORT 1 "aarch64_reg_or_zero" "rZ"))
+ (label_ref (match_operand 2))
+ (pc)))]
+ "TARGET_CMPBR"
+ {
+ return (get_attr_far_branch (insn) == FAR_BRANCH_NO)
+ ? "cb<SHORT:cmpbr_suffix><INT_CMP:cmp_op>\\t%<w>0, %<w>1, %l2"
+ : aarch64_gen_far_branch (operands, 2, "L",
+ "cb<SHORT:cmpbr_suffix><INT_CMP:inv_cmp_op>\\t%<w>0, %<w>1, ");
+ }
+ [(set_attr "type" "branch")
+ (set (attr "length")
+ (if_then_else (and (ge (minus (match_dup 2) (pc))
+ (const_int BRANCH_LEN_N_1Kib))
+ (lt (minus (match_dup 2) (pc))
+ (const_int BRANCH_LEN_P_1Kib)))
+ (const_int 4)
+ (const_int 8)))
+ (set (attr "far_branch")
+ (if_then_else (and (ge (minus (match_dup 2) (pc))
+ (const_int BRANCH_LEN_N_1Kib))
+ (lt (minus (match_dup 2) (pc))
+ (const_int BRANCH_LEN_P_1Kib)))
+ (const_string "no")
+ (const_string "yes")))]
+)
+
;; Emit `B<cond>`, assuming that the condition is already in the CC register.
(define_insn "aarch64_bcond"
[(set (pc) (if_then_else (match_operator 0 "aarch64_comparison_operator"
/*
** u8_x0_eq_x1:
-** and (w[0-9]+), w1, 255
-** cmp \1, w0, uxtb
-** beq .L([0-9]+)
+** cbbeq w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** u8_x0_ne_x1:
-** and (w[0-9]+), w1, 255
-** cmp \1, w0, uxtb
-** bne .L([0-9]+)
+** cbbne w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** u8_x0_ult_x1:
-** and (w[0-9]+), w1, 255
-** cmp \1, w0, uxtb
-** bhi .L([0-9]+)
+** cbbhi w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** u8_x0_ule_x1:
-** and (w[0-9]+), w1, 255
-** cmp \1, w0, uxtb
-** bcs .L([0-9]+)
+** cbbhs w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** u8_x0_ugt_x1:
-** and (w[0-9]+), w1, 255
-** cmp \1, w0, uxtb
-** bcc .L([0-9]+)
+** cbblo w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** u8_x0_uge_x1:
-** and (w[0-9]+), w1, 255
-** cmp \1, w0, uxtb
-** bls .L([0-9]+)
+** cbbls w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** i8_x0_slt_x1:
-** sxtb (w[0-9]+), w1
-** cmp \1, w0, sxtb
-** bgt .L([0-9]+)
+** cbbgt w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** i8_x0_sle_x1:
-** sxtb (w[0-9]+), w1
-** cmp \1, w0, sxtb
-** bge .L([0-9]+)
+** cbbge w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** i8_x0_sgt_x1:
-** sxtb (w[0-9]+), w1
-** cmp \1, w0, sxtb
-** blt .L([0-9]+)
+** cbblt w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** i8_x0_sge_x1:
-** sxtb (w[0-9]+), w1
-** cmp \1, w0, sxtb
-** ble .L([0-9]+)
+** cbble w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** u16_x0_eq_x1:
-** and (w[0-9]+), w1, 65535
-** cmp \1, w0, uxth
-** beq .L([0-9]+)
+** cbheq w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** u16_x0_ne_x1:
-** and (w[0-9]+), w1, 65535
-** cmp \1, w0, uxth
-** bne .L([0-9]+)
+** cbhne w0|w1, w1|w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** u16_x0_ult_x1:
-** and (w[0-9]+), w1, 65535
-** cmp \1, w0, uxth
-** bhi .L([0-9]+)
+** cbhhi w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** u16_x0_ule_x1:
-** and (w[0-9]+), w1, 65535
-** cmp \1, w0, uxth
-** bcs .L([0-9]+)
+** cbhhs w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** u16_x0_ugt_x1:
-** and (w[0-9]+), w1, 65535
-** cmp \1, w0, uxth
-** bcc .L([0-9]+)
+** cbhlo w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** u16_x0_uge_x1:
-** and (w[0-9]+), w1, 65535
-** cmp \1, w0, uxth
-** bls .L([0-9]+)
+** cbhls w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** i16_x0_slt_x1:
-** sxth (w[0-9]+), w1
-** cmp \1, w0, sxth
-** bgt .L([0-9]+)
+** cbhgt w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** i16_x0_sle_x1:
-** sxth (w[0-9]+), w1
-** cmp \1, w0, sxth
-** bge .L([0-9]+)
+** cbhge w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** i16_x0_sgt_x1:
-** sxth (w[0-9]+), w1
-** cmp \1, w0, sxth
-** blt .L([0-9]+)
+** cbhlt w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** i16_x0_sge_x1:
-** sxth (w[0-9]+), w1
-** cmp \1, w0, sxth
-** ble .L([0-9]+)
+** cbhle w1, w0, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** u32_x0_eq_x1:
-** cmp w0, w1
-** beq .L([0-9]+)
+** cbeq w0, w1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_ne_x1:
-** cmp w0, w1
-** bne .L([0-9]+)
+** cbne w0, w1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_ult_x1:
-** cmp w0, w1
-** bcc .L([0-9]+)
+** cblo w0, w1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_ule_x1:
-** cmp w0, w1
-** bls .L([0-9]+)
+** cbls w0, w1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_ugt_x1:
-** cmp w0, w1
-** bhi .L([0-9]+)
+** cbhi w0, w1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_uge_x1:
-** cmp w0, w1
-** bcs .L([0-9]+)
+** cbhs w0, w1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i32_x0_slt_x1:
-** cmp w0, w1
-** blt .L([0-9]+)
+** cblt w0, w1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i32_x0_sle_x1:
-** cmp w0, w1
-** ble .L([0-9]+)
+** cble w0, w1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i32_x0_sgt_x1:
-** cmp w0, w1
-** bgt .L([0-9]+)
+** cbgt w0, w1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i32_x0_sge_x1:
-** cmp w0, w1
-** bge .L([0-9]+)
+** cbge w0, w1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_eq_x1:
-** cmp x0, x1
-** beq .L([0-9]+)
+** cbeq x0, x1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_ne_x1:
-** cmp x0, x1
-** bne .L([0-9]+)
+** cbne x0, x1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_ult_x1:
-** cmp x0, x1
-** bcc .L([0-9]+)
+** cblo x0, x1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_ule_x1:
-** cmp x0, x1
-** bls .L([0-9]+)
+** cbls x0, x1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_ugt_x1:
-** cmp x0, x1
-** bhi .L([0-9]+)
+** cbhi x0, x1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_uge_x1:
-** cmp x0, x1
-** bcs .L([0-9]+)
+** cbhs x0, x1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i64_x0_slt_x1:
-** cmp x0, x1
-** blt .L([0-9]+)
+** cblt x0, x1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i64_x0_sle_x1:
-** cmp x0, x1
-** ble .L([0-9]+)
+** cble x0, x1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i64_x0_sgt_x1:
-** cmp x0, x1
-** bgt .L([0-9]+)
+** cbgt x0, x1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i64_x0_sge_x1:
-** cmp x0, x1
-** bge .L([0-9]+)
+** cbge x0, x1, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_eq_42:
-** cmp w0, 42
-** beq .L([0-9]+)
+** cbeq w0, 42, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_ne_42:
-** cmp w0, 42
-** bne .L([0-9]+)
+** cbne w0, 42, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_ult_42:
-** cmp w0, 41
-** bls .L([0-9]+)
+** cbls w0, 41, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_ule_42:
-** cmp w0, 42
-** bls .L([0-9]+)
+** cbls w0, 42, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_ugt_42:
-** cmp w0, 42
-** bhi .L([0-9]+)
+** cbhi w0, 42, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_uge_42:
-** cmp w0, 41
-** bhi .L([0-9]+)
+** cbhi w0, 41, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i32_x0_slt_42:
-** cmp w0, 41
-** ble .L([0-9]+)
+** cble w0, 41, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i32_x0_sle_42:
-** cmp w0, 42
-** ble .L([0-9]+)
+** cble w0, 42, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i32_x0_sgt_42:
-** cmp w0, 42
-** bgt .L([0-9]+)
+** cbgt w0, 42, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i32_x0_sge_42:
-** cmp w0, 41
-** bgt .L([0-9]+)
+** cbgt w0, 41, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_eq_42:
-** cmp x0, 42
-** beq .L([0-9]+)
+** cbeq x0, 42, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_ne_42:
-** cmp x0, 42
-** bne .L([0-9]+)
+** cbne x0, 42, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_ult_42:
-** cmp x0, 41
-** bls .L([0-9]+)
+** cbls x0, 41, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_ule_42:
-** cmp x0, 42
-** bls .L([0-9]+)
+** cbls x0, 42, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_ugt_42:
-** cmp x0, 42
-** bhi .L([0-9]+)
+** cbhi x0, 42, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_uge_42:
-** cmp x0, 41
-** bhi .L([0-9]+)
+** cbhi x0, 41, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i64_x0_slt_42:
-** cmp x0, 41
-** ble .L([0-9]+)
+** cble x0, 41, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i64_x0_sle_42:
-** cmp x0, 42
-** ble .L([0-9]+)
+** cble x0, 42, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i64_x0_sgt_42:
-** cmp x0, 42
-** bgt .L([0-9]+)
+** cbgt x0, 42, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i64_x0_sge_42:
-** cmp x0, 41
-** bgt .L([0-9]+)
+** cbgt x0, 41, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u8_x0_eq_0:
-** tst w0, 255
-** beq .L([0-9]+)
+** cbbeq w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u8_x0_ne_0:
-** tst w0, 255
-** bne .L([0-9]+)
+** cbbne w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u8_x0_ule_0:
-** tst w0, 255
-** beq .L([0-9]+)
+** cbbeq w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u8_x0_ugt_0:
-** tst w0, 255
-** bne .L([0-9]+)
+** cbbne w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i8_x0_slt_0:
-** tbnz w0, 7, .L([0-9]+)
+** cbblt w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i8_x0_sle_0:
-** sxtb (w[0-9]+), w0
-** cmp \1, 0
-** ble .L([0-9]+)
+** cbble w0, wzr, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** i8_x0_sgt_0:
-** sxtb (w[0-9]+), w0
-** cmp \1, 0
-** bgt .L([0-9]+)
+** cbbgt w0, wzr, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** i8_x0_sge_0:
-** tbz w0, 7, .L([0-9]+)
+** cbbge w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u16_x0_eq_0:
-** tst w0, 65535
-** beq .L([0-9]+)
+** cbheq w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u16_x0_ne_0:
-** tst w0, 65535
-** bne .L([0-9]+)
+** cbhne w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u16_x0_ule_0:
-** tst w0, 65535
-** beq .L([0-9]+)
+** cbheq w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u16_x0_ugt_0:
-** tst w0, 65535
-** bne .L([0-9]+)
+** cbhne w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i16_x0_slt_0:
-** tbnz w0, 15, .L([0-9]+)
+** cbhlt w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i16_x0_sle_0:
-** sxth (w[0-9]+), w0
-** cmp \1, 0
-** ble .L([0-9]+)
+** cbhle w0, wzr, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** i16_x0_sgt_0:
-** sxth (w[0-9]+), w0
-** cmp \1, 0
-** bgt .L([0-9]+)
+** cbhgt w0, wzr, .L([0-9]+)
** b not_taken
-** .L\2:
+** .L\1:
** b taken
*/
/*
** i16_x0_sge_0:
-** tbz w0, 15, .L([0-9]+)
+** cbhge w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_eq_0:
-** cbz w0, .L([0-9]+)
+** cbeq w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_ne_0:
-** cbnz w0, .L([0-9]+)
+** cbne w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_ule_0:
-** cbz w0, .L([0-9]+)
+** cbeq w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u32_x0_ugt_0:
-** cbnz w0, .L([0-9]+)
+** cbne w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i32_x0_sle_0:
-** cmp w0, 0
-** ble .L([0-9]+)
+** cble w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i32_x0_sgt_0:
-** cmp w0, 0
-** bgt .L([0-9]+)
+** cbgt w0, wzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i32_x0_sge_0:
-** tbz w0, #31, .L([0-9]+)
-** b not_taken
-** .L\1:
+** cblt w0, wzr, .L([0-9]+)
** b taken
+** .L\1:
+** b not_taken
*/
/*
** u64_x0_eq_0:
-** cbz x0, .L([0-9]+)
+** cbeq x0, xzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_ne_0:
-** cbnz x0, .L([0-9]+)
+** cbne x0, xzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_ule_0:
-** cbz x0, .L([0-9]+)
+** cbeq x0, xzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** u64_x0_ugt_0:
-** cbnz x0, .L([0-9]+)
+** cbne x0, xzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i64_x0_sle_0:
-** cmp x0, 0
-** ble .L([0-9]+)
+** cble x0, xzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i64_x0_sgt_0:
-** cmp x0, 0
-** bgt .L([0-9]+)
+** cbgt x0, xzr, .L([0-9]+)
** b not_taken
** .L\1:
** b taken
/*
** i64_x0_sge_0:
-** tbz x0, #63, .L([0-9]+)
-** b not_taken
-** .L\1:
+** cblt x0, xzr, .L([0-9]+)
** b taken
+** .L\1:
+** b not_taken
*/
/*
** u8_x0_eq_42:
-** and (w[0-9]+), w0, 255
-** cmp \1, 42
-** beq .L([0-9]+)
+** mov w([0-9]+), 42
+** cbbeq w0, w\1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u8_x0_ne_42:
-** and (w[0-9]+), w0, 255
-** cmp \1, 42
-** bne .L([0-9]+)
+** mov (w[0-9]+), 42
+** cbbne w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u8_x0_ult_42:
-** and (w[0-9]+), w0, 255
-** cmp \1, 41
-** bls .L([0-9]+)
+** mov (w[0-9]+), 41
+** cbbls w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u8_x0_ule_42:
-** and (w[0-9]+), w0, 255
-** cmp \1, 42
-** bls .L([0-9]+)
+** mov (w[0-9]+), 42
+** cbbls w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u8_x0_ugt_42:
-** and (w[0-9]+), w0, 255
-** cmp \1, 42
-** bhi .L([0-9]+)
+** mov (w[0-9]+), 42
+** cbbhi w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u8_x0_uge_42:
-** and (w[0-9]+), w0, 255
-** cmp \1, 41
-** bhi .L([0-9]+)
+** mov (w[0-9]+), 41
+** cbbhi w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i8_x0_slt_42:
-** sxtb (w[0-9]+), w0
-** cmp \1, 41
-** ble .L([0-9]+)
+** mov (w[0-9]+), 41
+** cbble w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i8_x0_sle_42:
-** sxtb (w[0-9]+), w0
-** cmp \1, 42
-** ble .L([0-9]+)
+** mov (w[0-9]+), 42
+** cbble w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i8_x0_sgt_42:
-** sxtb (w[0-9]+), w0
-** cmp \1, 42
-** bgt .L([0-9]+)
+** mov (w[0-9]+), 42
+** cbbgt w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i8_x0_sge_42:
-** sxtb (w[0-9]+), w0
-** cmp \1, 41
-** bgt .L([0-9]+)
+** mov (w[0-9]+), 41
+** cbbgt w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_eq_42:
-** and (w[0-9]+), w0, 65535
-** cmp \1, 42
-** beq .L([0-9]+)
+** mov w([0-9]+), 42
+** cbheq w0, w\1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_ne_42:
-** and (w[0-9]+), w0, 65535
-** cmp \1, 42
-** bne .L([0-9]+)
+** mov (w[0-9]+), 42
+** cbhne w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_ult_42:
-** and (w[0-9]+), w0, 65535
-** cmp \1, 41
-** bls .L([0-9]+)
+** mov (w[0-9]+), 41
+** cbhls w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_ule_42:
-** and (w[0-9]+), w0, 65535
-** cmp \1, 42
-** bls .L([0-9]+)
+** mov (w[0-9]+), 42
+** cbhls w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_ugt_42:
-** and (w[0-9]+), w0, 65535
-** cmp \1, 42
-** bhi .L([0-9]+)
+** mov (w[0-9]+), 42
+** cbhhi w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_uge_42:
-** and (w[0-9]+), w0, 65535
-** cmp \1, 41
-** bhi .L([0-9]+)
+** mov (w[0-9]+), 41
+** cbhhi w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i16_x0_slt_42:
-** sxth (w[0-9]+), w0
-** cmp \1, 41
-** ble .L([0-9]+)
+** mov (w[0-9]+), 41
+** cbhle w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i16_x0_sle_42:
-** sxth (w[0-9]+), w0
-** cmp \1, 42
-** ble .L([0-9]+)
+** mov (w[0-9]+), 42
+** cbhle w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i16_x0_sgt_42:
-** sxth (w[0-9]+), w0
-** cmp \1, 42
-** bgt .L([0-9]+)
+** mov (w[0-9]+), 42
+** cbhgt w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i16_x0_sge_42:
-** sxth (w[0-9]+), w0
-** cmp \1, 41
-** bgt .L([0-9]+)
+** mov (w[0-9]+), 41
+** cbhgt w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u8_x0_eq_64:
-** and (w[0-9]+), w0, 255
-** cmp \1, 64
-** beq .L([0-9]+)
+** mov w([0-9]+), 64
+** cbbeq w0, w\1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u8_x0_ne_64:
-** and (w[0-9]+), w0, 255
-** cmp \1, 64
-** bne .L([0-9]+)
+** mov (w[0-9]+), 64
+** cbbne w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u8_x0_ult_64:
-** and (w[0-9]+), w0, 255
-** cmp \1, 63
-** bls .L([0-9]+)
+** mov (w[0-9]+), 63
+** cbbls w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u8_x0_ule_64:
-** and (w[0-9]+), w0, 255
-** cmp \1, 64
-** bls .L([0-9]+)
+** mov (w[0-9]+), 64
+** cbbls w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u8_x0_ugt_64:
-** and (w[0-9]+), w0, 255
-** cmp \1, 64
-** bhi .L([0-9]+)
+** mov (w[0-9]+), 64
+** cbbhi w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u8_x0_uge_64:
-** and (w[0-9]+), w0, 255
-** cmp \1, 63
-** bhi .L([0-9]+)
+** mov (w[0-9]+), 63
+** cbbhi w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i8_x0_slt_64:
-** sxtb (w[0-9]+), w0
-** cmp \1, 63
-** ble .L([0-9]+)
+** mov (w[0-9]+), 63
+** cbble w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i8_x0_sle_64:
-** sxtb (w[0-9]+), w0
-** cmp \1, 64
-** ble .L([0-9]+)
+** mov (w[0-9]+), 64
+** cbble w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i8_x0_sgt_64:
-** sxtb (w[0-9]+), w0
-** cmp \1, 64
-** bgt .L([0-9]+)
+** mov (w[0-9]+), 64
+** cbbgt w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i8_x0_sge_64:
-** sxtb (w[0-9]+), w0
-** cmp \1, 63
-** bgt .L([0-9]+)
+** mov (w[0-9]+), 63
+** cbbgt w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_eq_64:
-** and (w[0-9]+), w0, 65535
-** cmp \1, 64
-** beq .L([0-9]+)
+** mov w([0-9]+), 64
+** cbheq w0, w\1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_ne_64:
-** and (w[0-9]+), w0, 65535
-** cmp \1, 64
-** bne .L([0-9]+)
+** mov (w[0-9]+), 64
+** cbhne w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_ult_64:
-** and (w[0-9]+), w0, 65535
-** cmp \1, 63
-** bls .L([0-9]+)
+** mov (w[0-9]+), 63
+** cbhls w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_ule_64:
-** and (w[0-9]+), w0, 65535
-** cmp \1, 64
-** bls .L([0-9]+)
+** mov (w[0-9]+), 64
+** cbhls w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_ugt_64:
-** and (w[0-9]+), w0, 65535
-** cmp \1, 64
-** bhi .L([0-9]+)
+** mov (w[0-9]+), 64
+** cbhhi w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_uge_64:
-** and (w[0-9]+), w0, 65535
-** cmp \1, 63
-** bhi .L([0-9]+)
+** mov (w[0-9]+), 63
+** cbhhi w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i16_x0_slt_64:
-** sxth (w[0-9]+), w0
-** cmp \1, 63
-** ble .L([0-9]+)
+** mov (w[0-9]+), 63
+** cbhle w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i16_x0_sle_64:
-** sxth (w[0-9]+), w0
-** cmp \1, 64
-** ble .L([0-9]+)
+** mov (w[0-9]+), 64
+** cbhle w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i16_x0_sgt_64:
-** sxth (w[0-9]+), w0
-** cmp \1, 64
-** bgt .L([0-9]+)
+** mov (w[0-9]+), 64
+** cbhgt w0, w1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i16_x0_sge_64:
-** sxth (w[0-9]+), w0
-** cmp \1, 63
-** bgt .L([0-9]+)
+** mov (w[0-9]+), 63
+** cbhgt w0, w1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u32_x0_ult_64:
-** cmp w0, 63
-** bls .L([0-9]+)
-** b not_taken
-** .L\1:
+** cbhi w0, 63, .L([0-9]+)
** b taken
+** .L\1:
+** b not_taken
*/
/*
/*
** i32_x0_slt_64:
-** cmp w0, 63
-** ble .L([0-9]+)
-** b not_taken
-** .L\1:
+** cbgt w0, 63, .L([0-9]+)
** b taken
+** .L\1:
+** b not_taken
*/
/*
/*
** u64_x0_ult_64:
-** cmp x0, 63
-** bls .L([0-9]+)
-** b not_taken
-** .L\1:
+** cbhi x0, 63, .L([0-9]+)
** b taken
+** .L\1:
+** b not_taken
*/
/*
/*
** i64_x0_slt_64:
-** cmp x0, 63
-** ble .L([0-9]+)
-** b not_taken
-** .L\1:
+** cbgt x0, 63, .L([0-9]+)
** b taken
+** .L\1:
+** b not_taken
*/
/*
/*
** u16_x0_eq_4098:
-** mov (w[0-9]+), 4098
-** cmp \1, w0, uxth
-** beq .L([0-9]+)
+** mov w([0-9]+), 4098
+** cbheq w0, w\1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_ne_4098:
** mov (w[0-9]+), 4098
-** cmp \1, w0, uxth
-** bne .L([0-9]+)
+** cbhne w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_ult_4098:
** mov (w[0-9]+), 4097
-** cmp \1, w0, uxth
-** bcs .L([0-9]+)
+** cbhls w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_ule_4098:
** mov (w[0-9]+), 4098
-** cmp \1, w0, uxth
-** bcs .L([0-9]+)
+** cbhls w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_ugt_4098:
** mov (w[0-9]+), 4098
-** cmp \1, w0, uxth
-** bcc .L([0-9]+)
+** cbhhi w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u16_x0_uge_4098:
** mov (w[0-9]+), 4097
-** cmp \1, w0, uxth
-** bcc .L([0-9]+)
+** cbhhi w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i16_x0_slt_4098:
** mov (w[0-9]+), 4097
-** cmp \1, w0, sxth
-** bge .L([0-9]+)
+** cbhle w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i16_x0_sle_4098:
** mov (w[0-9]+), 4098
-** cmp \1, w0, sxth
-** bge .L([0-9]+)
+** cbhle w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i16_x0_sgt_4098:
** mov (w[0-9]+), 4098
-** cmp \1, w0, sxth
-** blt .L([0-9]+)
+** cbhgt w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i16_x0_sge_4098:
** mov (w[0-9]+), 4097
-** cmp \1, w0, sxth
-** blt .L([0-9]+)
+** cbhgt w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u32_x0_eq_4098:
-** mov (w[0-9]+), 4098
-** cmp w0, \1
-** beq .L([0-9]+)
+** mov w([0-9]+), 4098
+** cbeq w0, w\1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u32_x0_ne_4098:
** mov (w[0-9]+), 4098
-** cmp w0, \1
-** bne .L([0-9]+)
+** cbne w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u32_x0_ult_4098:
** mov (w[0-9]+), 4097
-** cmp w0, \1
-** bls .L([0-9]+)
+** cbls w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u32_x0_ule_4098:
** mov (w[0-9]+), 4098
-** cmp w0, \1
-** bls .L([0-9]+)
+** cbls w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u32_x0_ugt_4098:
** mov (w[0-9]+), 4098
-** cmp w0, \1
-** bhi .L([0-9]+)
+** cbhi w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u32_x0_uge_4098:
** mov (w[0-9]+), 4097
-** cmp w0, \1
-** bhi .L([0-9]+)
+** cbhi w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i32_x0_slt_4098:
** mov (w[0-9]+), 4097
-** cmp w0, \1
-** ble .L([0-9]+)
+** cble w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i32_x0_sle_4098:
** mov (w[0-9]+), 4098
-** cmp w0, \1
-** ble .L([0-9]+)
+** cble w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i32_x0_sgt_4098:
** mov (w[0-9]+), 4098
-** cmp w0, \1
-** bgt .L([0-9]+)
+** cbgt w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i32_x0_sge_4098:
** mov (w[0-9]+), 4097
-** cmp w0, \1
-** bgt .L([0-9]+)
+** cbgt w0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u64_x0_eq_4098:
-** mov (x[0-9]+), 4098
-** cmp x0, \1
-** beq .L([0-9]+)
+** mov x([0-9]+), 4098
+** cbeq x0, x\1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u64_x0_ne_4098:
** mov (x[0-9]+), 4098
-** cmp x0, \1
-** bne .L([0-9]+)
+** cbne x0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u64_x0_ult_4098:
** mov (x[0-9]+), 4097
-** cmp x0, \1
-** bls .L([0-9]+)
+** cbls x0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u64_x0_ule_4098:
** mov (x[0-9]+), 4098
-** cmp x0, \1
-** bls .L([0-9]+)
+** cbls x0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u64_x0_ugt_4098:
** mov (x[0-9]+), 4098
-** cmp x0, \1
-** bhi .L([0-9]+)
+** cbhi x0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** u64_x0_uge_4098:
** mov (x[0-9]+), 4097
-** cmp x0, \1
-** bhi .L([0-9]+)
+** cbhi x0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i64_x0_slt_4098:
** mov (x[0-9]+), 4097
-** cmp x0, \1
-** ble .L([0-9]+)
+** cble x0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i64_x0_sle_4098:
** mov (x[0-9]+), 4098
-** cmp x0, \1
-** ble .L([0-9]+)
+** cble x0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i64_x0_sgt_4098:
** mov (x[0-9]+), 4098
-** cmp x0, \1
-** bgt .L([0-9]+)
+** cbgt x0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** i64_x0_sge_4098:
** mov (x[0-9]+), 4097
-** cmp x0, \1
-** bgt .L([0-9]+)
+** cbgt x0, \1, .L([0-9]+)
** b not_taken
** .L\2:
** b taken
/*
** far_branch_u8_x0_eq_x1:
** sub sp, sp, #16
-** and w([0-9]+), w1, 255
** str wzr, \[sp, 12\]
-** cmp w\1, w0, uxtb
-** bne .L([0-9]+)
+** cbbeq w0|w1, w1|w0, .L([0-9]+)
+** b .L([0-9]+)
+** .L\1:
** str wzr, \[sp, 12\]
** ...
** str wzr, \[sp, 12\]
** add sp, sp, 16
** b taken
*/
+
/*
** far_branch_u16_x0_eq_x1:
** sub sp, sp, #16
-** and w([0-9]+), w1, 65535
** str wzr, \[sp, 12\]
-** cmp w\1, w0, uxth
-** bne .L([0-9]+)
+** cbheq w0|w1, w1|w0, .L([0-9]+)
+** b .L([0-9]+)
+** .L\1:
** str wzr, \[sp, 12\]
** ...
** str wzr, \[sp, 12\]
** far_branch_u32_x0_eq_x1:
** sub sp, sp, #16
** str wzr, \[sp, 12\]
-** cmp w0|w1, w1|w0
-** bne .L([0-9]+)
+** cbeq w0, w1, .L([0-9]+)
+** b .L([0-9]+)
+** .L\1:
** str wzr, \[sp, 12\]
** ...
** str wzr, \[sp, 12\]
-** .L\1:
+** .L\2:
** add sp, sp, 16
** b taken
*/
** far_branch_u64_x0_eq_x1:
** sub sp, sp, #16
** str wzr, \[sp, 12\]
-** cmp x0|x1, x1|x0
-** bne .L([0-9]+)
+** cbeq x0, x1, .L([0-9]+)
+** b .L([0-9]+)
+** .L\1:
** str wzr, \[sp, 12\]
** ...
** str wzr, \[sp, 12\]
-** .L\1:
+** .L\2:
** add sp, sp, 16
** b taken
*/
/*
** far_branch_u8_x0_eq_42:
** sub sp, sp, #16
-** and w([0-9]+), w0, 255
+** mov w([0-9]+), 42
** str wzr, \[sp, 12\]
-** cmp w\1, 42
-** bne .L([0-9]+)
+** cbbeq w0, w\1, .L([0-9]+)
+** b .L([0-9]+)
+** .L\2:
** str wzr, \[sp, 12\]
** ...
** str wzr, \[sp, 12\]
-** .L\2:
+** .L\3:
** add sp, sp, 16
** b taken
*/
/*
** far_branch_u16_x0_eq_42:
** sub sp, sp, #16
-** and w([0-9]+), w0, 65535
+** mov w([0-9]+), 42
** str wzr, \[sp, 12\]
-** cmp w\1, 42
-** bne .L([0-9]+)
+** cbheq w0, w\1, .L([0-9]+)
+** b .L([0-9]+)
+** .L\2:
** str wzr, \[sp, 12\]
** ...
** str wzr, \[sp, 12\]
-** .L\2:
+** .L\3:
** add sp, sp, 16
** b taken
*/
** far_branch_u32_x0_eq_42:
** sub sp, sp, #16
** str wzr, \[sp, 12\]
-** cmp w0, 42
-** bne .L([0-9]+)
+** cbeq w0, 42, .L([0-9]+)
+** b .L([0-9]+)
+** .L\1:
** str wzr, \[sp, 12\]
** ...
** str wzr, \[sp, 12\]
-** .L\1:
+** .L\2:
** add sp, sp, 16
** b taken
*/
** far_branch_u64_x0_eq_42:
** sub sp, sp, #16
** str wzr, \[sp, 12\]
-** cmp x0, 42
-** bne .L([0-9]+)
+** cbeq x0, 42, .L([0-9]+)
+** b .L([0-9]+)
+** .L\1:
** str wzr, \[sp, 12\]
** ...
** str wzr, \[sp, 12\]
-** .L\1:
+** .L\2:
** add sp, sp, 16
** b taken
*/