Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failed: (Bits != 0 && "Cannot print this instruction.") for patchable functions #28898

Closed
llvmbot opened this issue Jul 12, 2016 · 2 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla llvm:codegen

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jul 12, 2016

Bugzilla Link 28524
Resolution FIXED
Resolved on Jul 13, 2016 11:39
Version trunk
OS All
Attachments test case
Reporter LLVM Bugzilla Contributor
CC @MatzeB,@sanjoy

Extended Description

$ llvm/buildDA/bin/llc -O3 test.ll
Assertion failed: (Bits != 0 && "Cannot print this instruction."), function printInstruction, file llvm/buildDA/lib/Target/X86/X86GenAsmWriter.inc, line 46606.
Stack dump:
0. Program arguments: llvm/buildDA/bin/llc -O3 tmp.ll

  1. Running pass 'Function Pass Manager' on module 'tmp.ll'.
  2. Running pass 'X86 Assembly / Object Emitter' on function '@test'

Problem happens when we are trying to print "PATCHABLE_OP 2, KILL, <ops...>"
"X86AsmPrinter::LowerPATCHABLE_OP" can't handle target independent opcodes.

Problematic instruction is generated from PatchableFunction.cpp. It looks for the first instruction which in this case turns out to be KILL. I suspect that http://reviews.llvm.org/rL274952 is indirectly responsible for such behaviour.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jul 12, 2016

assigned to @MatzeB

@MatzeB
Copy link
Contributor

MatzeB commented Jul 13, 2016

I put a first fix in r275278. We may want to clean this up in the long run by introducing an actual MCInstrDesc flag for pseudo instructions that won't generate machine instructions.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
trevor-m pushed a commit to trevor-m/llvm-project that referenced this issue Apr 20, 2023
lldb: libedit produces garbled, unusable input on Linux

Apply patch from Christos Zoulas, upstream libedit developer.
It has been tested on NetBSD/amd64.

New code supports combination of wide libedit and disabled
LLDB_EDITLINE_USE_WCHAR, which was the popular case on Linux
systems.

llvm-svn: 303907
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm:codegen
Projects
None yet
Development

No branches or pull requests

2 participants