Displaying 6 results from an estimated 6 matches for "gcd_ui".
2008 Jun 18
4
[LLVMdev] Ответ: using dynamic libraries from bytecode?
...t and
> used.  For example, on darwin, there sinf is resolved from a shared
> library, you declare it and call it, as normal.  You should be able to
> use llvm-gcc to see the bytecode of such a use of a routine from a
> dynamic library.
>
Thanks! But... small example (mingw):
$ cat gcd_ui.c
#include <stdio.h>
#include <gmp.h>
static void check_ui_range (void)
{
  mpz_t  x;
  mpz_init_set_ui (x, 111111L);
  mpz_mul_2exp (x, x, 1L);
  mpz_clear (x);
}
int main() {
  check_ui_range();
  printf("All works!\n");
  return 0;
}
$ llvm-gcc.exe -I/mingw/include gcd_...
2008 Jun 18
0
[LLVMdev] Ответ: using dynamic libraries from bytecode?
On Jun 18, 2008, at 12:27 PM, Yaroslav Kavenchuk wrote:
> $ llvm-gcc.exe -I/mingw/include gcd_ui.c -L/mingw/lib -lgmp -o
> gcd_ui.ll -emit-llvm -S
Use
> $ llvm-as gcd_ui.ll -o gcd_ui.bc
Use llc gcd_ui.bc and then llvm-gcc.exe gcd_ui.s -L/mingw/lib -lgmp?
2008 Jun 18
0
[LLVMdev] using dynamic libraries from bytecode?
On Jun 18, 2008, at 6:48 AM, Yaroslav Kavenchuk wrote:
> Is it possible to use dynamic library (*.so *.dll) from bytecode?
> If "yes" - how?
dlopen?  That's be one way.  Also, most systems have shared libraries  
in /usr/lib and these routines are meant to be linked against and  
used.  For example, on darwin, there sinf is resolved from a shared  
library, you declare it and
2008 Jun 18
2
[LLVMdev] using dynamic libraries from bytecode?
Is it possible to use dynamic library (*.so *.dll) from bytecode?
If "yes" - how?
-- 
WBR, Yaroslav Kavenchuk.
2008 Jun 19
0
[LLVMdev] Ответ: using dynamic libraries from bytecode?
...rom a shared
>> library, you declare it and call it, as normal.  You should be able  
>> to
>> use llvm-gcc to see the bytecode of such a use of a routine from a
>> dynamic library.
>>
>
> Thanks! But... small example (mingw):
> $ llvm-gcc.exe -I/mingw/include gcd_ui.c -L/mingw/lib -lgmp -o  
> gcd_ui.exe
>
> $ ./gcd_ui.exe
> All works!
>
> $ lli gcd_ui.bc
> ERROR: Program used external function '__gmpz_init_set_ui' which could
> not be resolved!
>
> This application has requested the Runtime to terminate it in an  
> un...
2008 Jun 19
1
[LLVMdev] Ответ: using dynamic libraries from bytecode?
Chris Lattner wrote:
>> $ lli gcd_ui.bc
>> ERROR: Program used external function '__gmpz_init_set_ui' which could
>> not be resolved!
>>
>> This application has requested the Runtime to terminate it in an  
>> unusual way.
>> Please contact the application's support team for more informa...