[LLVMdev] Wrong encoding/decoding for POPC instruction of Sparc (original) (raw)

James Y Knight jyknight at google.com
Fri Jul 31 07:56:31 PDT 2015


I'll look into it, thanks for the report.

On Thu, Jul 30, 2015 at 11:01 PM, Jun Koi <junkoi2004 at gmail.com> wrote:

Any ideas on this bug?

Thanks.

On Wed, Jul 29, 2015 at 12:17 AM, Jun Koi <junkoi2004 at gmail.com> wrote: Hello,

There is an issue in the latest Sparc code: while we can encode POPC, decode results in crash in llvm-mc $ echo "popc %g1, %g2" | ./Release+Asserts/bin/llvm-mc -assemble -triple=sparcv9 -show-encoding .text popc %g1, %g2 ! encoding: [0x85,0x70,0x00,0x01] $ echo "0x85,0x70,0x00,0x01"|./Release+Asserts/bin/llvm-mc -disassemble -triple=sparcv9 .text popc Assertion failed: (idx < size()), function operator[], file_ _/Users/jun/projects/llvm/sparc-2.git/include/llvm/ADT/SmallVector.h, line_ _143._ _0 llvm-mc 0x00000001096a5099_ _llvm::sys::PrintStackTrace(llvm::rawostream&) + 57_ _1 llvm-mc 0x00000001096a45c6_ _llvm::sys::RunSignalHandlers() + 102_ _2 llvm-mc 0x00000001096a5b95 SignalHandler(int) + 693_ _3 libsystemplatform.dylib 0x00007fff86d78f1a sigtramp + 26_ _4 libsystemplatform.dylib 0x0000000000000002 sigtramp + 2032693506_ _5 llvm-mc 0x00000001096a5836 abort + 22_ _6 llvm-mc 0x00000001096a5811 _assertrtn + 81_ _7 llvm-mc 0x000000010963f4e8_ _llvm::SparcInstPrinter::printOperand(llvm::MCInst const*, int,_ _llvm::MCSubtargetInfo const&, llvm::rawostream&) + 136_ _8 llvm-mc 0x000000010963eae0_ _llvm::SparcInstPrinter::printInstruction(llvm::MCInst const*,_ _llvm::MCSubtargetInfo const&, llvm::rawostream&) + 256_ _9 llvm-mc 0x000000010964f5e6_ _llvm::SparcInstPrinter::printInst(llvm::MCInst const*, llvm::rawostream&,_ _llvm::StringRef, llvm::MCSubtargetInfo const&) + 86_ _10 llvm-mc 0x000000010965f90f (anonymous_ _namespace)::MCAsmStreamer::EmitInstruction(llvm::MCInst const&,_ _llvm::MCSubtargetInfo const&) + 2879_ _11 llvm-mc 0x00000001096043b3_ _llvm::Disassembler::disassemble(llvm::Target const&,_ _std::_1::basicstring<char, std::_1::chartraits, _std::1::allocator > const&, llvm::MCSubtargetInfo&, llvm::MCStreamer&, llvm::MemoryBuffer&, llvm::SourceMgr&, llvm::rawostream&) + 2147 12 llvm-mc 0x0000000109607460 main + 9760 13 libdyld.dylib 0x00007fff8f34d5c9 start + 1 14 libdyld.dylib 0x0000000000000003 start + 1892362811 Stack dump: 0. Program arguments: ./Release+Asserts/bin/llvm-mc -disassemble -triple=sparcv9 Illegal instruction: 4

Any ideas on what is wrong, and how to fix this? Thank you.


LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150731/df02d7ba/attachment.html>



More information about the llvm-dev mailing list