Skip to content

Commit 090f24b

Browse files
s-barannikovLukacma
authored andcommitted
[Xtensa] Fix encoding of break.n (llvm#155159)
According to the manual, bits 3...0 should be 1101. (1100 is `movi.n`.)
1 parent 3794dcb commit 090f24b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

llvm/lib/Target/Xtensa/XtensaInstrInfo.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ let isBarrier = 1, isTerminator = 1 in {
14071407
let r = 0x04;
14081408
}
14091409

1410-
def BREAK_N : RRRN_Inst<0x0C, (outs), (ins uimm4:$imm),
1410+
def BREAK_N : RRRN_Inst<0x0D, (outs), (ins uimm4:$imm),
14111411
"break.n\t$imm", []>, Requires<[HasDensity, HasDebug]> {
14121412
bits<4> imm;
14131413

llvm/test/MC/Disassembler/Xtensa/debug.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# CHECK-DEBUG: break 1, 1
1010
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding
1111

12-
[0x2c,0xf1]
12+
[0x2d,0xf1]
1313
# CHECK-DEBUG: break.n 1
1414
# CHECK-CORE: [[#@LINE-2]]:2: warning: invalid instruction encoding
1515

llvm/test/MC/Xtensa/debug.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ break 1, 1
1111

1212
# Instruction format RRRN
1313
# CHECK-INST: break.n 1
14-
# CHECK: encoding: [0x2c,0xf1]
14+
# CHECK: encoding: [0x2d,0xf1]
1515
break.n 1
1616

1717
# Instruction format RRR

0 commit comments

Comments
 (0)