B

A32: branch, branch with link, and block data transfer / T32: 16-bit instructions

fixed bit field field the encoding fixes should be

A1

313029282726252423222120191817161514131211109876543210
cond1010imm24

xxxx1010xxxxxxxxxxxxxxxxxxxxxxxx
cond != 1111

Decode Sail

if ConditionPassed() then {
    assert(cond != 0b1111);
    let imm32 : bits(32) = SignExtend(imm24 @ 0b00, 32);
    execute_aarch32_instrs_B_Op_A_txt(imm32)
};
()

T1

1514131211109876543210
1101condimm8

1101xxxxxxxxxxxx
cond != 1111

Decode Sail

if ConditionPassed() then {
    assert(cond != 0b1111);
    if cond == 0b1110 then {
        throw(Error_See("UDF"))
    };
    if cond == 0b1111 then {
        throw(Error_See("SVC"))
    };
    let imm32 : bits(32) = SignExtend(imm8 @ 0b0, 32);
    if InITBlock() then {
        throw(Error_Unpredictable())
    };
    execute_aarch32_instrs_B_Op_A_txt(imm32)
};
()

T2

1514131211109876543210
11100imm11

11100xxxxxxxxxxx

Decode Sail

if ConditionPassed() then {
    let imm32 : bits(32) = SignExtend(imm11 @ 0b0, 32);
    if InITBlock() & not_bool(LastInITBlock()) then {
        throw(Error_Unpredictable())
    };
    execute_aarch32_instrs_B_Op_A_txt(imm32)
};
()

Operation Sail

BranchWritePC(PC_read__1() + imm32, BranchType_DIR)

Made from ScarletNX's Sail at 166ad3910f80. sail-arm's definitions are Arm's ASL in Sail (BSD 3-Clause Clear, license); ScarletNX's fixups are GPL-3.0-or-later.