Displaying 20 results from an estimated 100 matches similar to: "[LLVMdev] Ocaml bindings for execution engines"
2010 Feb 28
2
[LLVMdev] Tag number of OCaml Variant in executionengine
Hi,
At the code below from
./bindings/ocaml/executionengine/executionengine_ocaml.c,
we create an OCaml Variant from C. It is from 2.6, the latest 2.7 has
the same code.
Line 240 Option = alloc(1, 1) assigns tag1 to the 'some' constructor.
In term of http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html,
I think the 'some' should have a tag 0. We dont have a runtime error
for
2010 Feb 28
0
[LLVMdev] Tag number of OCaml Variant in executionengine
On Sun, Feb 28, 2010 at 8:38 AM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote:
> Hi,
>
> At the code below from
> ./bindings/ocaml/executionengine/executionengine_ocaml.c,
> we create an OCaml Variant from C. It is from 2.6, the latest 2.7 has
> the same code.
>
> Line 240 Option = alloc(1, 1) assigns tag1 to the 'some' constructor.
> In term of
2012 Apr 25
0
[LLVMdev] Crash in JIT
Hi David,
I'm not certain, but to me the "LLVMSetTarget(module, "i686-apple-darwin11");" line looks suspicious. I'm not familiar with all the ins and outs of how target triples get handled, but it looks to me like that's requesting 32-bit code.
I think that if you omit that line completely then the target will be inferred from the execution environment. My best
2012 Apr 25
2
[LLVMdev] Crash in JIT
Hello,
[Using LLVM r155315, according to `svn log | head`]
I am experimenting with programatically building and jitting functions in a module, and I seem to be coming across a crash in some generated code. Using the llvm-c interface I build up the module which dumps like this:
; ModuleID = 'MyModule'
target datalayout = "i686-apple-darwin11"
target triple =
2017 Jan 25
2
mcjit C interface problems
Hi, I'm attempting to use MCJIT with the C interface with llvm-3.9.0, and
it doesn't seem to work. This code is derived from Paul Smith's example
code:
int main(int argc, char const* argv[]) {
LLVMModuleRef mod = LLVMModuleCreateWithName("my_module");
LLVMTypeRef param_types[] = {LLVMInt32Type(), LLVMInt32Type()};
LLVMTypeRef ret_type =
2017 Jan 26
2
mcjit C interface problems
Thanks for the tip - getting closer:
$ ./capi_test 5 6
args[0]: 5
args[1]: 6
result: 4294959200
Here's the code I changed:
printf("args[0]: %d\n", (int)LLVMGenericValueToInt(args[0], 0));
printf("args[1]: %d\n", (int)LLVMGenericValueToInt(args[1], 0));
uint64_t (*func)();
func = (uint64_t (*)())LLVMGetFunctionAddress(engine, "sum");
2010 Mar 01
2
[LLVMdev] Tag number of OCaml Variant in executionengine
Another quick question.
In ./bindings/ocaml/Makefile.ocaml, the configurations when
ENABLE_OPTIMIZED<>1 are commented, which set -g flag to $(OCAMLC).
Is that for back-compatibility to support OCaml < 3.10.0?
On Sun, Feb 28, 2010 at 6:48 PM, Erick Tryzelaar
<idadesub at users.sourceforge.net> wrote:
> On Sun, Feb 28, 2010 at 8:38 AM, Jianzhou Zhao <jianzhou at
2015 Jan 08
2
[LLVMdev] JIT simple module and accessing the value fails
I'm using the llvm-c API and want to use the JIT. I've created the following
module
; ModuleID = '_tmp'
@a = global i64 5
define i64 @__tempfunc() {
entry:
%a_val = load i64* @a
ret i64 %a_val
}
This output is generated by LLVMDumpModule just before I call LLVMRunFunction.
Which yields a LLVMGenericValueRef. However converting the result to a 64bit
integer via
2008 Sep 12
1
[LLVMdev] [PATCH] Link in codegen components in llvm-c
This allows the use of shadow stack from the llvm-c API.
I am not sure this is the place to insert the include, though.
Index: include/llvm-c/ExecutionEngine.h
===================================================================
--- include/llvm-c/ExecutionEngine.h (revision 56175)
+++ include/llvm-c/ExecutionEngine.h (working copy)
@@ -24,6 +24,7 @@
#ifdef __cplusplus
extern "C" {
2010 Aug 12
3
[LLVMdev] LLVM-C: Calling functions contained in other libraries
Hello,
I have a question concerning llvm-c.
I have set up a function that needs to invoke an external method, in a other library. It has the following signature: void* NSFullUserName(void);
The void* can be replaced with a i8*, that far I was able to get, but when my call is invoked, the engine gives me the following message:
LLVM ERROR: Tried to execute an unknown external function: i8* ()*
2014 Aug 26
3
Segmentation fault when trying to add binding
Hi,
I am trying to add xmlXPathRegisterNs() to v2v/xml-c.c but I get a seg fault,
the signature should be:
http://xmlsoft.org/html/libxml-xpathInternals.html#xmlXPathRegisterNs
I think I am wrong in CAMLparam and CAMLlocal...,
Following is the patch:
===================================================================================
diff --git a/v2v/xml-c.c b/v2v/xml-c.c
index 4c9bc77..a917c24
2014 Sep 17
2
[LLVMdev] [cfe-dev] exc_bad_instruction on arm
I've also tried the next combination:
true, // ForceInterpreter
false, // UseMCJIT
and ios app just crashed with no output
2014-09-18 0:47 GMT+06:00 Anton Smirnov <dev at antonsmirnov.name>:
> Hey.
>
> I've checked out LLVM/Clang 3.5 and modified my static libs source code to
> use the latest llvm/clang sources.
> Also i'm trying triple
2016 Nov 09
0
[PATCH] filearch: Add s390 and s390x detection and tests.
Unfortunately I was unable to build s390 binaries since multilib was
dropped in Fedora 24 on s390x. Going from the source of the 'file'
command it seems as if it prints "32-bit" (the architecture is really
31 bit).
---
generator/actions.ml | 12 ++++++++++++
src/filearch.c | 10 ++++++++++
test-data/Makefile.am | 2 ++
2014 Sep 18
2
[LLVMdev] [cfe-dev] exc_bad_instruction on arm
Hi, Lang.
Thanks for clarification. I will check out current branch tomorrow and
report you back.
Most likely i will create bug issue with cleaned sources for static lib and
test ios app.
Actually i'm not professional c++ dev so my question is - is there any
chance to do the next:
1. compile .cpp code to .ll code (seems i already did it)
2. interpret .ll file by any supported at the moment
2014 Sep 18
2
[LLVMdev] [cfe-dev] exc_bad_instruction on arm
Hi, Lang.
2014-09-19 0:39 GMT+06:00 Lang Hames <lhames at gmail.com>:
> Hi Anton,
>
> I don't follow what you're asking?
>
> For (1): You can compile c++ files to .ll files with clang - it seems like
> you've already worked that out.
>
> For (2): What do you mean "supported at the moment"? In the 3.5 release
> MCJIT is known to be broken for
2010 Aug 12
0
[LLVMdev] LLVM-C: Calling functions contained in other libraries
On Aug 12, 2010, at 10:43 AM, F van der Meeren wrote:
> Where am I going wrong here?
>
Did you link against the library that contains the function?
-eric
2014 Sep 17
2
[LLVMdev] [cfe-dev] exc_bad_instruction on arm
Both Clang/LLVM 3.4 -> Clang/LLVM 3.5
And i will also try using MCJIT.
2014-09-17 18:56 GMT+06:00 Anton Smirnov <dev at antonsmirnov.name>:
> Hi, Tim.
>
> I've used Clang 3.4 final release and now i'm going to test it with 3.5
> release (since i've read about arm64 improvements).
> I will report my results.
>
> BTW, is it possible to get smth like
2011 Nov 09
6
[PATCH] Add tune2fs support to libguestfs.
At the moment OpenStack uses kpartx and nbd to resize filesystems and
inject files to guests. I sincerely hope they don't allow untrusted
users to upload guest images / AMIs :-(
To fix this I'm looking into adding libguestfs support as an optional
backend in OpenStack.
The only missing feature in libguestfs is the ability to call tune2fs
on a filesystem. This patch series adds tune2fs
2019 Aug 09
0
[PATCH libnbd 2/2] generator: Change handling of Flags to be a true optional argument.
In libguestfs generator we have the concept of optargs which is
different from plain arguments. These are mapped to optional
arguments in languages that support them such as Python.
This commit adds a new concept of optargs. At the moment it is simply
limited to handling the optional (in some bindings) flags parameter
which is used to handle the NBD_CMD_FLAG_* flags.
If present, the old Flags
2004 Feb 11
6
Spelling (PR#6570)
I came across this in connection with an unrelated issue
> beta[2]
Error in beta[2] : object is not subsettable
> beta[2] <- 5
Error in "[<-"(`*tmp*`, 2, value = 5) : object is not subsetable
One of the messages must be wrong, but I need a native English speaker
to tell me which one.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of