similar to: [LLVMdev] C library function declarations

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] C library function declarations"

2010 Jan 04
0
[LLVMdev] C library function declarations
On Mon, Jan 4, 2010 at 4:43 AM, Russell Wallace <russell.wallace at gmail.com> wrote: > When implementing a language using LLVM as the backend, it is > necessary to give programs written in that language, access to the C > standard library functions. The Kaleidoscope tutorial shows how to do > this for individual functions using extern declarations, but in > general it would
2010 Jan 04
1
[LLVMdev] C library function declarations
On Mon, Jan 4, 2010 at 5:41 AM, Kenneth Uildriks <kennethuil at gmail.com>wrote: > On Mon, Jan 4, 2010 at 4:43 AM, Russell Wallace > <russell.wallace at gmail.com> wrote: > > When implementing a language using LLVM as the backend, it is > > necessary to give programs written in that language, access to the C > > standard library functions. The Kaleidoscope
2007 Jun 14
2
FLAC: library for C#
Harry Sack wrote: > > but aren't they C++ headers en lib's? Not C++, C. > I have no idea how I can include a C++ > header in a C# project. > It this even possible? Yes. Google for "dllimport csharp". Erik -- ----------------------------------------------------------------- Erik de Castro Lopo -----------------------------------------------------------------
2007 Jun 14
2
FLAC: library for C#
I tried that approach a while ago and failed miserably. Marshalling the structs of structs in the flac lib turned out to be a nightmare (I don't pretend to be an expert, mind you...). I eventually switched to writing my own C# lib from scratch. Work is still under progress. It's no rocket science, I do this a G-job. It has definite limitations (no documentation, decodes only 16-bit files,
2006 Oct 12
1
using speex in C#
You could compile Speex as a DLL (see libspeex_dynamic.dsp) and use PInvoke. http://en.wikipedia.org/wiki/PInvoke Note that Speex will still be executing as unmanaged code and your program will have the added dependency of the native Speex DLL. It appears that someone created a "Speex.NET" based on JSpeex, but I didn't find any useful info on it. You may want to search for this
2010 Jan 04
4
[LLVMdev] Getting Kaleidoscope to compile
Hi all, I've started work on a new programming language for which I am considering using LLVM as the backend, and trying to experiment with it using the Kaleidoscope demo compiler. Taking the full source listing from http://llvm.org/docs/tutorial/LangImpl3.html#code and trying to compile it with the provided instructions gives me the following errors: a at a-desktop:~$ g++ -g -O3 toy.cpp
2014 Nov 29
3
[LLVMdev] Frontend: How to use Member to Function Pointer as callbacks
Hello, As part of a MSIL (i.e. C#) to LLVM frontend I am currently working on ( https://github.com/xen2/SharpLang ), I would need some help/hint about how to properly design "PInvoke callbacks". Through "PInvoke" mechanism .NET allows you to call C functions, i.e.: C#: [DllImport("libc.so")] extern void mempcy(void* dest, void* src, int size); // declaration of C
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,
2010 Mar 20
2
[LLVMdev] 2.7 Pre-release1 available for testing
On 20 March 2010 16:42, Russell Wallace <russell.wallace at gmail.com> wrote: > With Microsoft C++ (Windows Vista, 32-bit): > > LLVM 2.7 compiles (via cmake) without a hitch. > > I can't test it with my own code yet, will need to port from 2.6 to 2.7 > first. > > I was going to try running Kaleidoscope as a test case, but it doesn't > get built by default
2016 Apr 02
2
getSymbolAddressInProcess returning null
Tried that, still didn't work. Then I tried making a direct API call, GetProcAddress(GetModuleHandle(0),"foo") And this works if and only if __declspec(dllexport) is supplied. So it looks like we were both right. On Sat, Apr 2, 2016 at 9:29 AM, NAKAMURA Takumi <geek4civic at gmail.com> wrote: > Have you tried to add dllexport? > > On Sat, Apr 2, 2016 at 4:23 PM
2016 Apr 02
3
getSymbolAddressInProcess returning null
I've finally managed to extract from Kaleidoscope one particular thing that it seems to me should be working and isn't. Given the global declaration extern "C" void foo() {} within the same program I have RTDyldMemoryManager::getSymbolAddressInProcess("foo") And it's returning null. (LLVM 3.8, Windows 7 x64.) What am I missing? -------------- next part
2010 Jan 04
0
[LLVMdev] Getting Kaleidoscope to compile
Probably you missed to install llvm-dev package with headers for llvm. 2010/1/4 Russell Wallace <russell.wallace at gmail.com> > Hi all, > > I've started work on a new programming language for which I am > considering using LLVM as the backend, and trying to experiment with > it using the Kaleidoscope demo compiler. > > Taking the full source listing from >
2016 Mar 30
4
JIT compiler and calls to existing functions
For what it's worth we did a similar thing, but overrode RTDyldMemoryManager directly This allowed us to control where the RAM was allocated too (e.g. guarantee it was in the low 4GB so we could use small memory model and avoid the mov rax, xxxxxxx; call rax code generated for x86)*, and also override findSymbol() to have the same behaviour as described in 4). --matt * later issues in not
2016 Mar 31
1
Kaleidoscope examples on Windows
Are the Kaleidoscope examples supposed to work on Windows? e.g. C:\llvm\examples\Kaleidoscope\Orc\initial\toy.cpp when I try to compile this with clang it gives compile time error messages, and when I try with Microsoft C++ it generates an executable that runs but crashes when I type in an expression; I get similar results with a few of the other versions. I can give more detailed feedback if
2010 Jan 31
2
[LLVMdev] Compiling Kaleidoscope on Windows
I don't suppose anyone knows what (or how to find out what) the actual command to compile Kaleidoscope is? I followed cmake/nmake down through maybe half a dozen levels before getting lost, so I tried to develop a compiler invocation from scratch. I got as far as cl /EHsc /I\d\llvm-2.6\include /I\llvm\include /wd4355 toy.cpp which successfully generated toy.obj and spat out 86 link time
2016 Mar 29
3
JIT compiler and calls to existing functions
True, I care more about how fast the code runs than how long it takes to compile it. So if the symbolic approach enables better code generation, that is a very significant advantage from my perspective. Is there any example code or documentation you can point to for details about how to implement the symbolic approach? Is it similar to any of the versions of Kaleidoscope or any other extant
2010 Mar 20
0
[LLVMdev] 2.7 Pre-release1 available for testing
With Microsoft C++ (Windows Vista, 32-bit): LLVM 2.7 compiles (via cmake) without a hitch. I can't test it with my own code yet, will need to port from 2.6 to 2.7 first. I was going to try running Kaleidoscope as a test case, but it doesn't get built by default the way it did in 2.6, and running nmake in the Kaleidoscope directory performs no operation. Am I missing something here?
2019 May 14
2
Current ORC API?
At the moment, neither the example code in the slides PDF, nor that in the new kaleidoscope tutorial, successfully compiles against the current version of ORC (in LLVM 8.0.0). Presumably because this is because ORC has changed since they were written. Is there any example code that works with the current version of ORC? -------------- next part -------------- An HTML attachment was scrubbed...
2016 Mar 29
3
JIT compiler and calls to existing functions
Ah! Okay then, so you are saying something substantive that I think I disagree with, but that could be because there are relevant issues I don't understand. My reasoning is, I've already got a pointer to the function I want the generated code to call, so I just supply that pointer, it looks ugly on a microscopic scale because there are a couple of lines of casts to shepherd it through the
2016 Mar 29
2
JIT compiler and calls to existing functions
That seems to work, thanks! The specific code I ended up with to call int64_t print(int64_t) looks like: auto f = builder.CreateIntToPtr( ConstantInt::get(builder.getInt64Ty(), uintptr_t(print)), PointerType::getUnqual(FunctionType::get( builder.getInt64Ty(), {builder.getInt64Ty()}, false))); return builder.CreateCall(f, args); On Mon, Mar