[LLVMbugs] [Bug 14286] hello-world codegen fails: EmitRawText called on MCStreamer unsupported [powerpc-darwin8]

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 22 16:45:55 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=14286

David Fang <fang at csl.cornell.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |benny.kra at gmail.com
         Resolution|WORKSFORME                  |---

--- Comment #7 from David Fang <fang at csl.cornell.edu> ---
With the following test case, compiling natively on powerpc-darwin8:
// reloc-extern-call.c
extern void foo(void);
void bar(void) { foo(); }

[fangism:~/temp/clang] fang% make reloc-extern-call.o                          
~/local/src/LLVM-svn/gcc40-cmake-build/bin/clang -fno-common -DPIC -c
reloc-extern-call.c -o reloc-extern-call.o
\-{ llvm::MCAsmBackend* llvm::createPPCAsmBackend(const llvm::Target&,
llvm::StringRef, llvm::StringRef)
/-} llvm::MCAsmBackend* llvm::createPPCAsmBackend(const llvm::Target&,
llvm::StringRef, llvm::StringRef)
\-{ virtual
llvm::MCObjectWriter*<unnamed>::DarwinPPCAsmBackend::createObjectWriter(llvm::raw_ostream&)
const
| \-{ llvm::MCObjectWriter* llvm::createPPCMachObjectWriter(llvm::raw_ostream&,
bool, uint32_t, uint32_t)
| | \-{ llvm::MCObjectWriter*
llvm::createMachObjectWriter(llvm::MCMachObjectTargetWriter*,
llvm::raw_ostream&, bool)
| | /-} llvm::MCObjectWriter*
llvm::createMachObjectWriter(llvm::MCMachObjectTargetWriter*,
llvm::raw_ostream&, bool)
| /-} llvm::MCObjectWriter* llvm::createPPCMachObjectWriter(llvm::raw_ostream&,
bool, uint32_t, uint32_t)
/-} virtual
llvm::MCObjectWriter*<unnamed>::DarwinPPCAsmBackend::createObjectWriter(llvm::raw_ostream&)
const
\-{ virtual
void<unnamed>::PPCDarwinAsmPrinter::EmitStartOfAsmFile(llvm::Module&)
/-} virtual
void<unnamed>::PPCDarwinAsmPrinter::EmitStartOfAsmFile(llvm::Module&)
\-{ void llvm::AsmPrinter::EmitBasicBlockStart(const llvm::MachineBasicBlock*)
const
/-} void llvm::AsmPrinter::EmitBasicBlockStart(const llvm::MachineBasicBlock*)
const
\-{ virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
/-} virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
\-{ virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
/-} virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
\-{ virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
/-} virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
\-{ virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
/-} virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
\-{ virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
/-} virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
\-{ virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
/-} virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
\-{ virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
/-} virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
\-{ virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
/-} virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
\-{ virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
/-} virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
\-{ virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
/-} virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
\-{ virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
/-} virtual void<unnamed>::PPCAsmPrinter::EmitInstruction(const
llvm::MachineInstr*)
\-{ void<unnamed>::PPCDarwinAsmPrinter::EmitFunctionStubs(const
std::vector<std::pair<llvm::MCSymbol*, llvm::PointerIntPair<llvm::MCSymbol*,
1u, bool, llvm::PointerLikeTypeTraits<llvm::MCSymbol*> > >,
std::allocator<std::pair<llvm::MCSymbol*, llvm::PointerIntPair<llvm::MCSymbol*,
1u, bool, llvm::PointerLikeTypeTraits<llvm::MCSymbol*> > > > >&)
| :  Reloc::PIC_
| :  FIXME: MCize this.
EmitRawText called on an MCStreamer that doesn't support it,  something must
not be fully mc'ized
/Users/fang/local/src/LLVM-svn/llvm/lib/Support/Unix/Signals.inc:372: failed
assertion `0 && "Bailing out..."'
Stack dump:
0.      Program arguments:
/Volumes/Isolde/builds/LLVM/gcc40-cmake-build/bin/clang-3.1 -cc1 -triple
powerpc-apple-macosx10.4.0 -emit-obj -mrelax-all -disable-free -main-file-name
reloc-extern-call.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim
-masm-verbose -coverage-file /Users/fang/temp/clang/reloc-extern-call.o
-resource-dir
/Volumes/Isolde/builds/LLVM/gcc40-cmake-build/bin/../lib/clang/3.3 -D PIC
-fdebug-compilation-dir /Users/fang/temp/clang -ferror-limit 19
-fmessage-length 80 -mstackrealign -fblocks -fblocks-runtime-optional
-fobjc-runtime=macosx-10.4.0 -fobjc-default-synthesize-properties
-fencode-extended-block-signature -fno-common -fdiagnostics-show-option
-fcolor-diagnostics -backend-option -vectorize-loops -o reloc-extern-call.o -x
c reloc-extern-call.c 
1.      <eof> parser at end of file
2.      Code generation
clang-3: error: unable to execute command: Abort trap
clang-3: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk)
Target: powerpc-apple-darwin8.11.0
Thread model: posix
clang-3: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-3: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3: note: diagnostic msg: /tmp/reloc-extern-call-T66NVZ.c
clang-3: note: diagnostic msg: /tmp/reloc-extern-call-T66NVZ.sh
clang-3: note: diagnostic msg: 

********************


EmitRawText is being called by
void PPCDarwinAsmPrinter::
EmitFunctionStubs(const MachineModuleInfoMachO::SymbolListTy &Stubs)
in lib/Target/PowerPC/PPCAsmPrinter.cpp:

      // FIXME: MCize this.
      STACKTRACE_INDENT_PRINT("FIXME: MCize this." << std::endl);
      OutStreamer.EmitRawText("\tbcl 20, 31, " + Twine(AnonSymbol->getName()));

Can that be fixed?  This is blocking me from testing PPCMachObjectWriter.

I'm currently at r175024.

-- 
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/20130223/deb94ef0/attachment.html>


More information about the llvm-bugs mailing list