[PATCH] D137727: [SPARC] Simplify instruction decoder.
Koakuma via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 20 01:25:55 PST 2022
koakuma requested changes to this revision.
koakuma added a comment.
This revision now requires changes to proceed.
The patch doesn't apply cleanly as-is on my test system (seems like there are some of the proposed changes that's already in main?).
Once I got the patch to apply, though, it seems to be hitting some assertion failures:
******************** TEST 'LLVM :: MC/Disassembler/Sparc/sparc-mem.txt' FAILED ********************
Script:
--
: 'RUN: at line 1'; /home/k/llvm-debug/src/llvm-project/out/bin/llvm-mc --disassemble /home/k/llvm-debug/src/llvm-project/llvm/test/M
C/Disassembler/Sparc/sparc-mem.txt -triple=sparcv9-unknown-linux | /home/k/llvm-debug/src/llvm-project/out/bin/FileCheck /home/k/llvm-debug/src/llvm-project/llvm/test/MC/Disassembler/Sparc/sparc-mem.txt -- Exit Code: 2
Command Output (stderr):
--
llvm-mc: /home/k/llvm-debug/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h:298: const T& llvm::SmallVectorTemplateCommon<T, <temp
late-parameter-1-2> >::operator[](llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::size_type) const [with T = llvm::MCOpe
rand; <template-parameter-1-2> = void; llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::const_reference = const llvm::MCOperand&; llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::size_type = long unsigned int]: Assertion `idx < size()' failed
.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/k/llvm-debug/src/llvm-project/out/bin/llvm-mc --disassemble /home/k/llvm-debug/src/llvm-project/llvm/t
est/MC/Disassembler/Sparc/sparc-mem.txt -triple=sparcv9-unknown-linux
#0 0xfff80001013a3afc PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
FileCheck error: '<stdin>' is empty.
FileCheck command line: /home/k/llvm-debug/src/llvm-project/out/bin/FileCheck /home/k/llvm-debug/src/llvm-project/llvm/test/MC/Disasse
mbler/Sparc/sparc-mem.txt
--
******************** TEST 'LLVM :: MC/Disassembler/Sparc/sparc-coproc.txt' FAILED ********************
Script:
--
: 'RUN: at line 1'; /home/k/llvm-debug/src/llvm-project/out/bin/llvm-mc --disassemble /home/k/llvm-debug/src/llvm-project/llvm/test/M
C/Disassembler/Sparc/sparc-coproc.txt -triple=sparcv9-unknown-linux | /home/k/llvm-debug/src/llvm-project/out/bin/FileCheck /home/k/llv
m-debug/src/llvm-project/llvm/test/MC/Disassembler/Sparc/sparc-coproc.txt
--
Exit Code: 2
Command Output (stderr):
--
llvm-mc: /home/k/llvm-debug/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h:298: const T& llvm::SmallVectorTemplateCommon<T, <temp
late-parameter-1-2> >::operator[](llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::size_type) const [with T = llvm::MCOpe
rand; <template-parameter-1-2> = void; llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::const_reference = const llvm::MCO
perand&; llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::size_type = long unsigned int]: Assertion `idx < size()' failed
.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /home/k/llvm-debug/src/llvm-project/out/bin/llvm-mc --disassemble /home/k/llvm-debug/src/llvm-project/llvm/t
est/MC/Disassembler/Sparc/sparc-coproc.txt -triple=sparcv9-unknown-linux
#0 0xfff80001014a3afc PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
FileCheck error: '<stdin>' is empty.
FileCheck command line: /home/k/llvm-debug/src/llvm-project/out/bin/FileCheck /home/k/llvm-debug/src/llvm-project/llvm/test/MC/Disasse
mbler/Sparc/sparc-coproc.txt
--
================
Comment at: llvm/test/MC/Disassembler/Sparc/sparc-coproc.txt:1
+# RUN: llvm-mc --disassemble %s -triple=sparcv9-unknown-linux | FileCheck %s
+
----------------
Coprocessor instructions are only available in v8.
v9 reassigned the encoding to other instructions (see §A.23 and §A.53 of the v9 ISA spec, for example), so I think the decoder should differentiate between the two meanings, if possible.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137727/new/
https://reviews.llvm.org/D137727
More information about the llvm-commits
mailing list