search for: putchard

Displaying 12 results from an estimated 12 matches for "putchard".

Did you mean: putchar
2019 Jan 07
2
Kaleidoscope tutorial: extern functions failing
...reference code listing, as well as my own code. link to code: https://llvm.org/docs/tutorial/LangImpl05.html#full-code-listing [c34n10 kaleidoscope] ./toy ready> extern sin(x); sin(1); ready> Read extern: declare double @sin(double) ready> ready> Evaluated to 0.841471 ready> extern putchard(x); putchard(120); ready> Read extern: declare double @putchard(double) ready> ready> Failure value returned from cantFail wrapped call UNREACHABLE executed at ~/project/llvm/include/llvm/Support/Error.h:732! Aborted (core dumped) sin is, of course, defined in libm. putchard is declared...
2008 Sep 25
3
[LLVMdev] Kaleidoscope doesn't work properly
Hi I hope this is a proper place to put my question. I've compiled Kaleidoscope from "Adding JIT and Optimizer Support" tutorial. Basically it works just fine but when I try to run extern'ed putchard function it aborts. Please, tell me what am I doing wrong? Here is more information: My PC runs FreeBSD. I've copied the toy source code exactly and didn't change it. Here is the log: # ./toy ready> extern putchard(x); ready> Read extern: declare double @putchard(double) ready>...
2008 Sep 01
3
[LLVMdev] Unresolveable fallthrough functions
Hello, > ready> ERROR: Program used external function 'putchard' which could not be > resolved! > Any idea of what could be wrong? Please make sure you're using C linkage for such functions, due to mangling the name of function being emitted is not "putchard". Something like this: extern "C" void putchard(char c) { ... } Or...
2008 Sep 01
0
[LLVMdev] Unresolveable fallthrough functions
Anton Korobeynikov wrote: > > Hello, > >> ready> ERROR: Program used external function 'putchard' which could not >> be >> resolved! >> Any idea of what could be wrong? > Please make sure you're using C linkage for such functions, due to > mangling the name of > function being emitted is not "putchard". Something like this: > > extern "...
2008 Sep 25
0
[LLVMdev] Kaleidoscope doesn't work properly
...or provide a mapping. /Stein Roger Andrii Vasyliev wrote: > Hi > > I hope this is a proper place to put my question. > > I've compiled Kaleidoscope from "Adding JIT and Optimizer Support" tutorial. > Basically it works just fine but when I try to run extern'ed putchard > function it aborts. > Please, tell me what am I doing wrong? > > Here is more information: > My PC runs FreeBSD. > I've copied the toy source code exactly and didn't change it. > > Here is the log: > # ./toy > ready> extern putchard(x); > ready> Read...
2017 Feb 06
3
Kaleidoscope tutorial: comments, corrections and Windows support
...) %multmp = fmul double %calltmp, %calltmp1 %calltmp2 = call double @cos(double %x) %calltmp3 = call double @cos(double %x) %multmp4 = fmul double %calltmp2, %calltmp3 %addtmp = fadd double %multmp, %multmp4 ret double %addtmp }" - "extern putchard(x); putchard(120);": Again, on Windows, this doesn't work. To make it work, you have to use "extern "C" __declspec(dllexport) double putchard(double X)" so the function will be found via GetProcAddress for the main module. This wouldn't hurt for Linu...
2008 Sep 01
0
[LLVMdev] Unresolveable fallthrough functions
Hi, I'm following the Kaleidoscope tutorial (which is very good btw) and am having difficulties having function calls for functions that haven't been defined getting resolved to plain C++ functions. In the tutorial (end of chapter 4), executing "extern putchard(x); putchard(120);" should execute the corresponding C++ function defined in the same file. Unfortunately in my case it only produces the following error: ready> ERROR: Program used external function 'putchard' which could not be resolved! Any idea of what could be wrong? Thanks!...
2016 Apr 01
2
Kaleidoscope on Windows - bug maybe found?
To try to find out why it was crashing, I followed the trail of function calls: C:\llvm\examples\Kaleidoscope\Orc\initial\toy.cpp auto ExprSymbol = J.findUnmangledSymbol("__anon_expr"); JITSymbol findUnmangledSymbol(const std::string Name) { return findSymbol(mangle(Name)); } JITSymbol findSymbol(const std::string &Name) { return CompileLayer.findSymbol(Name,
2016 Apr 01
0
Kaleidoscope on Windows - bug maybe found?
Addendum: this still fails: auto ExprSymbol = J.findSymbol("putchard"); As yet, I have no idea why - that symbol even seemed to be exported: extern "C" double putchard(double X) { putchar((char)X); return 0; } On Fri, Apr 1, 2016 at 2:42 AM, Russell Wallace <russell.wallace at gmail.com> wrote: > To try to find out why it was crashi...
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...dleTopLevelExpression(); break; } } } //===----------------------------------------------------------------------===// // "Library" functions that can be "extern'd" from user code. //===----------------------------------------------------------------------===// /// putchard - putchar that takes a double and returns 0. extern "C" double putchard(double X) { putchar((char)X); return 0; } //===----------------------------------------------------------------------===// // Main driver code. //===---------------------------------------------------------------...
2010 Feb 17
0
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...t; > > > > //===----------------------------------------------------------------------===// > // "Library" functions that can be "extern'd" from user code. > > //===----------------------------------------------------------------------===// > > /// putchard - putchar that takes a double and returns 0. > extern "C" > double putchard(double X) { > putchar((char)X); > return 0; > } > > > //===----------------------------------------------------------------------===// > // Main driver code. > > //===-----------...
2010 Feb 17
1
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...t; //===----------------------------------------------------------------------===// >> // "Library" functions that can be "extern'd" from user code. >> >> //===----------------------------------------------------------------------===// >> >> /// putchard - putchar that takes a double and returns 0. >> extern "C" >> double putchard(double X) { >>  putchar((char)X); >>  return 0; >> } >> >> >> //===----------------------------------------------------------------------===// >> // Main dri...