Displaying 20 results from an estimated 100 matches similar to: "[LLVMdev] Calling functions"
2008 Feb 22
2
[LLVMdev] Calling functions
Hello!
I'm trying LLVM for generating code and I found something I cannot figure out or find in the documentation:
I'm doing something like this to call "sin" from std:
std::vector<const Type*> params;
params.push_back( Type::FloatTy );
FunctionType *FT = FunctionType::get( Type::FloatTy, params, false);
Function *F = new Function( FT, Function::ExternalLinkage,
2004 Apr 02
0
[LLVMdev] Function pointers
So, here comes the next question:)
Now the program compiles, but crashes when run, "Segmentation fault".
%kernel = type { int ()* }
int %puts_kernel()
{
ret int 0
}
int %main() {
%theKernel = alloca %kernel
%puts_kernelPTR = getelementptr %kernel* %theKernel, long 1, ubyte 0
store int ()* %puts_kernel, int ()** %puts_kernelPTR
ret int 0
}
I want to learn how to
2004 Apr 02
0
[LLVMdev] Function pointers
I solved that one by substituting alloca into malloc, and forwarded the problem to actually calling the %puts_kernel function via my newly created function pointer.
This works:
%tmp.1 = call int %puts_kernel()
This:
%tmp.2 = call int %puts_kernelPTR()
issues error:
"Reference to an invalid definition: 'puts_kernelPTR' of type 'int () *'"
How do I call the function
2004 Apr 02
0
[LLVMdev] Function pointers
On Fri, 2 Apr 2004, Anders Alexandersson wrote:
> OK, I solved it all ( so far :) ), mixing in some load-instructions and
> called on the result of that, which worked.
>
> Here is the skeleton-code:
>
> %kernel = type { int ()* }
>
> int puts_kernel(){...}
>
> ; main()
>
> %theKernel = malloc %kernel
> %puts_kernelPTR = getelementptr %kernel* %theKernel,
2004 Apr 02
2
[LLVMdev] Function pointers
OK, I solved it all ( so far :) ), mixing in some load-instructions and called on the result of that, which worked.
Here is the skeleton-code:
%kernel = type { int ()* }
int puts_kernel(){...}
; main()
%theKernel = malloc %kernel
%puts_kernelPTR = getelementptr %kernel* %theKernel, long 1, ubyte 0
store int ()* %puts_kernel, int ()** %puts_kernelPTR
%tmp.11 = load int ()** %puts_kernelPTR
2009 Jun 13
1
Terminator Salavation
Hello,
the Game starts correctly and i can see the videos and have sound. The Menue and the Game are white. See Link: http://img257.imageshack.us/img257/8585/bildschirmphoto5.png
I have wine 1.1.9, 1.1.19 and 1.1.23 testet, with lot of Regedit functions ( Direct3D) half and full screen, with win xp, win vista, win 2k3, win 2k the failure it's all time.
Installed is the nVidia 185.18.14
2008 Nov 11
2
Memory corruption on Gallium window resize, diagnosed?
Hi,
I've been playing with nouveau/mesa branch gallium-0.1, trying to get
trivial/tri working on nv20 (with nv10 code). When ever I resize the window,
it ends up in an assert failure:
#0 0xf790744f in _debug_assert_fail (expr=0xf791908f "0", file=0xf7919050 "nv20_state_emit.c", line=139,
function=0xf7919034 "nv20_state_emit_framebuffer") at p_debug.c:335
2006 Oct 16
0
No window decorations for simple glut app on compiz/aiglx?
The simple glut app below demonstrates a problem i'm seeing here.
It fails to get a title bar, window frame or any other wm decorations.
Same results when passing -direct or -indirect on command line.
It works as expected when compiz isn't the WM.
Can anyone else confirm they see this too?
Any suggestions on how to fix this up?
Thanks much,
Sean
P.S. compiled with -lGL -lglut and
2011 Sep 25
1
Trying to wine starcraft 2
What is the problem?
trace:wgl:wglGetProcAddress func: 'glAccum'
trace:wgl:X11DRV_WineGL_InitOpenglInfo GL version : 1.4 (2.1 (3.3.11005 Compatibility Profile Context)).
trace:wgl:X11DRV_WineGL_InitOpenglInfo GL renderer : ATI Radeon HD 4800 Series .
trace:wgl:X11DRV_WineGL_InitOpenglInfo GLX version : 1.4.
trace:wgl:X11DRV_WineGL_InitOpenglInfo
2009 Apr 10
0
[PATCH/Gallium] nv50_clear again (might work better)
I've been looking at REnouveau dumps to check how the blob does the clear buffers
thing and they seem to do it a bit differently than what you committed, so I tried
a new version of the clear functions (see how I changed it below) with a little test:
Setup 2 texture render targets (and a depth target) and glClear them to a color
changing with time, then render a triangle textured with the
2016 Apr 05
0
a few questions about OpenGL and nouveau
On Tue, Apr 5, 2016 at 2:38 PM, Daniel Melo Jorge da Cunha
<dmjcunha at gmail.com> wrote:
> Hi... I know... glBegin/glEnd is deprecated but I have an old computer 32bit
> CPU,
> running fedora 19, mesa-9.2.4, NV63... any help are welcomed.
I've fixed a *ton* of nv3x/nv4x issues since then, I'd recommend
giving Mesa 11.2.0 a whirl.
>
> Please forgive if I misuderstood
2016 Apr 05
2
a few questions about OpenGL and nouveau
Hi... I know... glBegin/glEnd is deprecated but I have an old computer
32bit CPU,
running fedora 19, mesa-9.2.4, NV63... any help are welcomed.
Please forgive if I misuderstood everything.
So I have a simple OpenGL program that draws a black background and a white
line... I will write the code of myline() inside of main() so as I can
learn.
main (..) {
X and glX stuff...
/* at this moment I
2012 Apr 11
1
Guild Wars - Direct3D8 is not available without OpenGL.
Hello everyone!
As one might think from my subject line this thread seems to be about the usual no-32bit-OpenGL-libraries-installed issue, that Google is full of when you are looking for a solution.
My problem is a bit different: My system is 64bit, indeed, but the 32 bit graphics libraries/drivers are installed.
32bit native games like Enemy Territory run fine.
GuildWars starts with the
2006 May 17
2
[LLVMdev] Re: __main() function and AliasSet
On Tuesday 16 May 2006 03:19, Chris Lattner wrote:
> On Mon, 15 May 2006, Nai Xia wrote:
>
> > In other words, if I only use -steens-aa and the data_XXXs are all
> > external global variables( and so inComplete ),
>
> Sounds right!
>
> > the call to printf will
> > make the same effect, which I have tested it.
> >
> > Am I right ? :)
>
2007 Jul 20
0
[LLVMdev] Seg faulting on vector ops
Hi Chuck!
On Jul 20, 2007, at 11:36 AM, Chuck Rose III wrote:
> Hola LLVMers,
>
>
>
> I’m looking to make use of the vectorization primitives in the
> Intel chip with the code we generate from LLVM and so I’ve started
> experimenting with it. What is the state of the machine code
> generated for vectors? In my tinkering, I seem to be getting some
> wonky
2007 Jul 26
0
[LLVMdev] Seg faulting on vector ops
I am fairly certain this is right. Chuck, can you do a quick
experiment for me? Go back to your original code but make sure the
alloca instruction specify 16-byte alignment. The code should work.
If not, please file a bug.
Thanks,
Evan
On Jul 24, 2007, at 1:58 PM, Evan Cheng wrote:
> Hrm. This problem shouldn't be target specific. I am pretty sure
> prologue / epilogue inserter
2007 Jul 21
0
[LLVMdev] Seg faulting on vector ops
On Fri, 20 Jul 2007, Chuck Rose III wrote:
> I'm looking to make use of the vectorization primitives in the Intel
> chip with the code we generate from LLVM and so I've started
> experimenting with it. What is the state of the machine code generated
> for vectors? In my tinkering, I seem to be getting some wonky machine
> instructions, but I'm most likely just doing
2007 Jul 24
2
[LLVMdev] Seg faulting on vector ops
Hrm. This problem shouldn't be target specific. I am pretty sure
prologue / epilogue inserter aligns stack correctly if there are
stack objects with greater than default stack alignment requirement.
Seems to be the initial alloca() instruction should specify 16 byte
alignment?
Evan
On Jul 21, 2007, at 2:51 PM, Chris Lattner wrote:
> On Fri, 20 Jul 2007, Chuck Rose III wrote:
2008 Jan 04
0
[LLVMdev] Vectors and function calls across modules
Hey all, thanks for your prompt replies from before, now I have more
questions!
First, I've heard rumors about the ability to call functions across
modules. I'm interested in learning how, but I haven't been able to
figure it out yet. I tried just taking a Function* that I got from one
module and calling it from another one, but that didn't work. How do I
do that?
Second,
2008 Jan 05
0
[LLVMdev] Calling functions across modules. And those pesky vectors!
Danny wrote:
I made a
> simple function which was just supposed to multiply two 3 component
> float vectors and return the result:
"Vectors must have a power of two length (1, 2, 4, 8, 16 ...)."
- http://llvm.org/docs/LangRef.html#t_vector
> //Snip on:
> VectorType *vType = VectorType::get(Type::FloatTy, 3);
Nick