@@ -1450,6 +1450,27 @@ def WITLB : RRR_Inst<0x00, 0x00, 0x05, (outs AR:$t), (ins AR:$s),
14501450 let r = 0x6;
14511451}
14521452
1453+ //===----------------------------------------------------------------------===//
1454+ // Illegal instructions
1455+ //===----------------------------------------------------------------------===//
1456+
1457+ let isBarrier = 1, isTerminator = 1 in {
1458+ def ILL : CALLX_Inst<0x00, 0x00, 0x00, (outs), (ins),
1459+ "ill", []> {
1460+ let m = 0x0;
1461+ let n = 0x0;
1462+ let r = 0;
1463+ let s = 0;
1464+ }
1465+
1466+ def ILL_N : RRRN_Inst<0x0C, (outs), (ins),
1467+ "ill.n", []>, Requires<[HasDensity]> {
1468+ let r = 0xf;
1469+ let s = 0x0;
1470+ let t = 0x6;
1471+ }
1472+ }
1473+
14531474//===----------------------------------------------------------------------===//
14541475// Atomic patterns
14551476//===----------------------------------------------------------------------===//
@@ -1584,6 +1605,40 @@ let usesCustomInserter = 1, Predicates = [HasS32C1I] in {
15841605 [(set AR:$dst, (atomic_load_umax_32 AR:$ptr, AR:$arg))]>;
15851606}
15861607
1608+ //===----------------------------------------------------------------------===//
1609+ // Xtensa ESP32S2 Instructions
1610+ //===----------------------------------------------------------------------===//
1611+ let Predicates = [HasESP32S2Ops] in {
1612+ def WR_MASK_GPIO_OUT : RRR_Inst<0x0, 0x06, 0x0, (outs), (ins AR:$s, AR:$t),
1613+ "wr_mask_gpio_out\t$s, $t", []> {
1614+ let r = 0x2;
1615+ }
1616+
1617+ def SET_BIT_GPIO_OUT : RRR_Inst<0x0, 0x06, 0x0, (outs), (ins select_256:$imm),
1618+ "set_bit_gpio_out\t$imm", []> {
1619+ bits<8> imm;
1620+
1621+ let r = 0x1;
1622+ let s = imm{7-4};
1623+ let t = imm{3-0};
1624+ }
1625+
1626+ def CLR_BIT_GPIO_OUT : RRR_Inst<0x0, 0x06, 0x0, (outs), (ins select_256:$imm),
1627+ "clr_bit_gpio_out\t$imm", []> {
1628+ bits<8> imm;
1629+
1630+ let r = 0x0;
1631+ let s = imm{7-4};
1632+ let t = imm{3-0};
1633+ }
1634+
1635+ def GET_GPIO_IN : RRR_Inst<0x0, 0x06, 0x0, (outs AR:$t), (ins),
1636+ "get_gpio_in\t$t", []> {
1637+ let r = 0x3;
1638+ let s = 0x0;
1639+ }
1640+ }
1641+
15871642//===----------------------------------------------------------------------===//
15881643// DSP Instructions
15891644//===----------------------------------------------------------------------===//
0 commit comments