search for: emitcall1

Displaying 5 results from an estimated 5 matches for "emitcall1".

2017 Jun 05
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
...t from my codegen: auto ty = val->getType(); cout << "val type:" << endl; ty->dump(); cout << "ptr type:" << endl; ptr->getType()->dump(); // Print memory ctx.EmitCall1("debugPointer", ptr); // Set class pointer auto c = ctx.bld.CreateExtractValue(val, 0, "class"); auto cp = ctx.bld.CreateConstGEP2_32(ty, ptr, 0, 0); auto cx = ctx.bld.CreatePtrToInt(cp, ctx.Int32Type()); ctx.EmitCall1(...
2017 Jun 06
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
...ype(); >> cout << "val type:" << endl; >> ty->dump(); >> cout << "ptr type:" << endl; >> ptr->getType()->dump(); >> // Print memory >> ctx.EmitCall1("debugPointer", ptr); >> // Set class pointer >> auto c = ctx.bld.CreateExtractValue(val, 0, "class"); >> auto cp = ctx.bld.CreateConstGEP2_32(ty, ptr, 0, 0); >> auto cx = ctx.bld.CreatePtrToInt(cp, ctx.Int3...
2017 Jun 04
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
Emitting calls to these functions (written in an .ll file linked in) works fine, and does the right thing. %Any = type { i8*, i32 } define dllexport void @setGlobal(%Any* %ptr, %Any %value) { store %Any %value, %Any* %ptr ret void } define dllexport %Any @getGlobal(%Any* %ptr) { %val = load %Any, %Any* %ptr ret %Any %val } Trying to replace the setGlobal call with what should be
2017 Jun 06
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
...; "val type:" << endl; >>>> ty->dump(); >>>> cout << "ptr type:" << endl; >>>> ptr->getType()->dump(); >>>> // Print memory >>>> ctx.EmitCall1("debugPointer", ptr); >>>> // Set class pointer >>>> auto c = ctx.bld.CreateExtractValue(val, 0, "class"); >>>> auto cp = ctx.bld.CreateConstGEP2_32(ty, ptr, 0, 0); >>>> auto cx = ctx...
2017 Jun 07
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
...gt;>>>>> ty->dump(); >>>>>> cout << "ptr type:" << endl; >>>>>> ptr->getType()->dump(); >>>>>> // Print memory >>>>>> ctx.EmitCall1("debugPointer", ptr); >>>>>> // Set class pointer >>>>>> auto c = ctx.bld.CreateExtractValue(val, 0, "class"); >>>>>> auto cp = ctx.bld.CreateConstGEP2_32(ty, ptr, 0, 0); >>>>&g...