Open
Description
I separate the bug report #67787 since the report has distinct bugs
The subsequent issue was identified within Clang v16.0.0.
Operand Type Check Bug
Clang changes a memory operand as an immediate value in the case of bc1tl
, bc1fl
, jal
, jalx
and j
instructions.
$ cat buggy3.s
bc1tl (1)
bc1fl (2)
jal (3)
jalx (4)
j (5)
$ ./bin/clang -c --target=mips buggy3.s -o buggy3.o
$ objdump -d buggy3.o
00000000 <.text>:
0: 45030000 bc1tl 0x4
4: 00000000 nop
8: 45020000 bc1fl 0xc
c: 00000000 nop
10: 0c000000 jal 0x0
14: 00000000 nop
18: 74000001 jalx 0x4
1c: 00000000 nop
20: 08000001 j 0x4
24: 00000000 nop