<div dir="ltr"><div>Hello,<br><br>There is an issue in the latest Sparc code: while we can encode
POPC, decode results in crash in llvm-mc<br><br>$ echo "popc %g1, %g2" | ./Release+Asserts/bin/llvm-mc -assemble -triple=sparcv9 -show-encoding<br> .text<br> popc %g1, %g2 ! encoding: [0x85,0x70,0x00,0x01]<br><br>$ echo "0x85,0x70,0x00,0x01"|./Release+Asserts/bin/llvm-mc -disassemble -triple=sparcv9<br> .text<br> popc Assertion failed: (idx < size()), function operator[], file /Users/jun/projects/llvm/sparc-2.git/include/llvm/ADT/SmallVector.h, line 143.<br>0 llvm-mc 0x00000001096a5099 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 57<br>1 llvm-mc 0x00000001096a45c6 llvm::sys::RunSignalHandlers() + 102<br>2 llvm-mc 0x00000001096a5b95 SignalHandler(int) + 693<br>3 libsystem_platform.dylib 0x00007fff86d78f1a _sigtramp + 26<br>4 libsystem_platform.dylib 0x0000000000000002 _sigtramp <a href="tel:%2B%202032693506" value="+2032693506" target="_blank">+ 2032693506</a><br>5 llvm-mc 0x00000001096a5836 abort + 22<br>6 llvm-mc 0x00000001096a5811 __assert_rtn + 81<br>7 llvm-mc 0x000000010963f4e8 llvm::SparcInstPrinter::printOperand(llvm::MCInst const*, int, llvm::MCSubtargetInfo const&, llvm::raw_ostream&) + 136<br>8 llvm-mc 0x000000010963eae0 llvm::SparcInstPrinter::printInstruction(llvm::MCInst const*, llvm::MCSubtargetInfo const&, llvm::raw_ostream&) + 256<br>9 llvm-mc 0x000000010964f5e6 llvm::SparcInstPrinter::printInst(llvm::MCInst const*, llvm::raw_ostream&, llvm::StringRef, llvm::MCSubtargetInfo const&) + 86<br>10 llvm-mc 0x000000010965f90f (anonymous namespace)::MCAsmStreamer::EmitInstruction(llvm::MCInst const&, llvm::MCSubtargetInfo const&) + 2879<br>11 llvm-mc 0x00000001096043b3 llvm::Disassembler::disassemble(llvm::Target
const&, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >
const&, llvm::MCSubtargetInfo&, llvm::MCStreamer&,
llvm::MemoryBuffer&, llvm::SourceMgr&, llvm::raw_ostream&) +
2147<br>12 llvm-mc 0x0000000109607460 main + 9760<br>13 libdyld.dylib 0x00007fff8f34d5c9 start + 1<br>14 libdyld.dylib 0x0000000000000003 start + 1892362811<span class="im"><br>Stack dump:<br>0. Program arguments: ./Release+Asserts/bin/llvm-mc -disassemble -triple=sparcv9 <br>Illegal instruction: 4<br><br><br></span>Any ideas on what is wrong, and how to fix this?<br><br><br></div>Thank you.<br></div>