Implement b (unconditional branch)
PiperOrigin-RevId: 416905594
diff --git a/src/xnnpack/aarch32-assembler.h b/src/xnnpack/aarch32-assembler.h
index 2268514..12a5d0b 100644
--- a/src/xnnpack/aarch32-assembler.h
+++ b/src/xnnpack/aarch32-assembler.h
@@ -348,6 +348,7 @@
Assembler& add(CoreRegister rd, CoreRegister rn, CoreRegister rm);
// Only support uint8_t immediates for now, it simplifies encoding.
Assembler& add(CoreRegister rd, CoreRegister rn, uint8_t imm);
+ Assembler& b(Label& l) { return b(kAL, l); }
Assembler& beq(Label& l) { return b(kEQ, l); }
Assembler& bne(Label& l) { return b(kNE, l); }
Assembler& bhi(Label& l) { return b(kHI, l); }
diff --git a/test/aarch32-assembler.cc b/test/aarch32-assembler.cc
index 3915a4d..76e073c 100644
--- a/test/aarch32-assembler.cc
+++ b/test/aarch32-assembler.cc
@@ -208,10 +208,13 @@
a.bhs(l1);
auto b5 = a.offset();
a.blo(l1);
+ auto b6 = a.offset();
+ a.b(l1);
EXPECT_INSTR(0x8AFFFFFD, *b3);
EXPECT_INSTR(0x2AFFFFFC, *b4);
EXPECT_INSTR(0x3AFFFFFB, *b5);
+ EXPECT_INSTR(0xEAFFFFFA, *b6);
// Binding a bound label is an error.
a.bind(l1);