[llvm-bugs] [Bug 51251] New: [MIPS] Many MIPS16 instructions are not recognized
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jul 28 11:01:34 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51251
Bug ID: 51251
Summary: [MIPS] Many MIPS16 instructions are not recognized
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: jesse.a.deguire at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
Created attachment 25082
--> https://bugs.llvm.org/attachment.cgi?id=25082&action=edit
Test asm file containing every MIPS16 instruction
It would appear that LLVM does not recognize many MIPS16 instructions.
The attached assembly file is a test I made that contains, as far as I can
tell, every MIPS16 instruction. I can build it with GCC 9.3 without any issues
using the following command on Ubuntu 20.04 64-bit (Windows 10 WSL).
mipsel-linux-gnu-gcc -march=mips32r2 -mips16 <source> -o <obj file>
However, trying to build it with Clang or LLVM-MC fails with many "instruction
requires a CPU feature not currently enabled" or "invalid operand for
instruction" errors. I have not yet verified that the instructions that do not
cause errors are correctly encoded, but a cursory look suggests that they are
not (they might be using the MIPS32 forms instead).
llvm-mc -arch=mipsel -mcpu=mips32r2 -mattr=+mips16 -show-encoding
-show-inst <source>
--OR--
clang -target mipsel-linux-gnu-musl -march=mips32r2 -mips16 -c <source> -o
<obj file>
I cloned and built my version of LLVM and Clang on 27 July, 2021; however, I
believe this issue has been present for a long time. It is present on LLVM 10
that is available on Ubuntu 20.04.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210728/e78630d0/attachment-0001.html>
More information about the llvm-bugs
mailing list