Displaying 17 results from an estimated 17 matches for "startfunctionstub".
2006 May 14
2
[LLVMdev] JIT machine code deletion
On Fri, 12 May 2006, Ralph Corderoy wrote:
>> If you don't *know* that all (e.g.) function pointers to this code are
>> dead (which means that execution could come back to the function), you
>> should use the ExecutionEngine::recompileAndRelinkFunction(F) method.
>
> recompileAndRelinkFunction() overwrites the old machine code with a
> branch to the new. Is it
2006 May 14
0
[LLVMdev] JIT machine code deletion
...its 16 bytes.
AtI[0] = BUILD_LIS(12, Addr >> 16); // lis r12, hi16(address)
AtI[1] = BUILD_ORI(12, 12, Addr); // ori r12, r12, low16(address)
AtI[2] = BUILD_MTCTR(12); // mtctr r12
AtI[3] = BUILD_BCTR(isCall); // bctr/bctrl
but I understand now how startFunctionStub() is given StubSize and on
PowerPC it's 16 so there's no problem.
Cheers,
Ralph.
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...et!");
> + return 0;
> + }
> +
> + virtual void EmitLabel(uint64_t LabelID) {
> + }
> +
> +
> + virtual void setModuleInfo(llvm::MachineModuleInfo* MMI) { }
> +
> +
> /// JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE!
> void startFunctionStub(unsigned StubSize, unsigned Alignment =
> 1) {
> assert(0 && "JIT specific function called!");
> Index: lib/CodeGen/MachOWriter.cpp
> ===================================================================
> --- lib/CodeGen/MachOWriter.cpp (revision 44794)
>...
2007 Dec 12
3
[LLVMdev] Exception handling in JIT
...}
>> +
>> + virtual void EmitLabel(uint64_t LabelID) {
>> + }
>> +
>> +
>> + virtual void setModuleInfo(llvm::MachineModuleInfo* MMI) { }
>> +
>> +
>> /// JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE!
>> void startFunctionStub(unsigned StubSize, unsigned Alignment =
>> 1) {
>> assert(0 && "JIT specific function called!");
>> Index: lib/CodeGen/MachOWriter.cpp
>> ===================================================================
>> --- lib/CodeGen/MachOWriter.cpp (...
2007 Dec 10
2
[LLVMdev] Exception handling in JIT
Hi everyone,
Here's a patch that enables exception handling when jitting. I've
copy/pasted _many_code from lib/Codegen/DwarfWriter.cpp, so we may need
to factorize it, but the functionality is there and I'm very happy with
it :)
lli should now be able to execute the output from llvm-gcc when using
exceptions (the UnwindInst instruction is not involved in this patch).
Just add the
2008 Mar 30
3
[LLVMdev] Being able to know the jitted code-size before emitting
Hi everyone,
vmkit requires to know the size of a jitted method before emitting the
method. This allows to allocate the correct size for the method. The
attached patch creates this functionality when the flag SizedMemoryCode
is on.
In order to implement this functionality, i had to virtualize some
MachineCodeEmitter functions.
Is it OK to commit the patch?
Thanks,
Nicolas
--------------
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...; + JumpTableBase = (void*)(((uintptr_t) JumpTableBase) +
>> CurBufferPtr);
>> + }
>> +
>> + virtual bool finishFunction(MachineFunction &F) {
>> + MCE->setCurrentPtr(CurBufferPtr);
>> + return false;
>> + }
>> + virtual void startFunctionStub(unsigned StubSize, unsigned
>> Alignment) {}
>> + virtual void *finishFunctionStub(const Function *F) { return 0; }
>> + virtual void addRelocation(const llvm::MachineRelocation&) { }
>> + virtual void emitByte(unsigned char B) {
>> + CurBufferPtr++;
>&g...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...ase) +
> CurBufferPtr);
> + JumpTableBase = (void*)(((uintptr_t) JumpTableBase) +
> CurBufferPtr);
> + }
> +
> + virtual bool finishFunction(MachineFunction &F) {
> + MCE->setCurrentPtr(CurBufferPtr);
> + return false;
> + }
> + virtual void startFunctionStub(unsigned StubSize, unsigned
> Alignment) {}
> + virtual void *finishFunctionStub(const Function *F) { return 0; }
> + virtual void addRelocation(const llvm::MachineRelocation&) { }
> + virtual void emitByte(unsigned char B) {
> + CurBufferPtr++;
> + }
> + virtual...
2008 Feb 04
0
[LLVMdev] Exception handling in JIT
...lID) {
> + assert(0 && "emit Label not implementated yet!");
> + abort();
> + }
> +
> +
> + virtual void setModuleInfo(llvm::MachineModuleInfo* MMI) { }
> +
> +
> /// JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE!
> void startFunctionStub(unsigned StubSize, unsigned Alignment =
> 1) {
> assert(0 && "JIT specific function called!");
> Index: lib/CodeGen/MachOWriter.cpp
> ===================================================================
> --- lib/CodeGen/MachOWriter.cpp (revision 46612)
>...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...id*)(((uintptr_t) JumpTableBase) +
>>> CurBufferPtr);
>>> + }
>>> +
>>> + virtual bool finishFunction(MachineFunction &F) {
>>> + MCE->setCurrentPtr(CurBufferPtr);
>>> + return false;
>>> + }
>>> + virtual void startFunctionStub(unsigned StubSize, unsigned
>>> Alignment) {}
>>> + virtual void *finishFunctionStub(const Function *F) { return 0; }
>>> + virtual void addRelocation(const llvm::MachineRelocation&) { }
>>> + virtual void emitByte(unsigned char B) {
>>> + CurB...
2008 Feb 01
2
[LLVMdev] Exception handling in JIT
Dear all,
Here's a new patch with Evan's comments (thx Evan!) and some cleanups.
Now the (duplicated) exception handling code is in a new file:
lib/ExecutionEngine/JIT/JITDwarfEmitter.
This patch should work on linux/x86 and linux/ppc (tested).
Nicolas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: jit-exceptions.patch
URL:
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...+
>>>> CurBufferPtr);
>>>> + }
>>>> +
>>>> + virtual bool finishFunction(MachineFunction &F) {
>>>> + MCE->setCurrentPtr(CurBufferPtr);
>>>> + return false;
>>>> + }
>>>> + virtual void startFunctionStub(unsigned StubSize, unsigned
>>>> Alignment) {}
>>>> + virtual void *finishFunctionStub(const Function *F) { return 0; }
>>>> + virtual void addRelocation(const llvm::MachineRelocation&) { }
>>>> + virtual void emitByte(unsigned char B) {
>&g...
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
...gt; + }
>>>>>> +
>>>>>> + virtual bool finishFunction(MachineFunction &F) {
>>>>>> + MCE->setCurrentPtr(CurBufferPtr);
>>>>>> + return false;
>>>>>> + }
>>>>>> + virtual void startFunctionStub(unsigned StubSize, unsigned
>>>>>> Alignment) {}
>>>>>> + virtual void *finishFunctionStub(const Function *F) { return
>>>>>> 0; }
>>>>>> + virtual void addRelocation(const llvm::MachineRelocation&) { }
>>>>...
2008 Apr 05
0
[LLVMdev] Being able to know the jitted code-size before emitting
...;>>> +
>>>>>>> + virtual bool finishFunction(MachineFunction &F) {
>>>>>>> + MCE->setCurrentPtr(CurBufferPtr);
>>>>>>> + return false;
>>>>>>> + }
>>>>>>> + virtual void startFunctionStub(unsigned StubSize, unsigned
>>>>>>> Alignment) {}
>>>>>>> + virtual void *finishFunctionStub(const Function *F) { return
>>>>>>> 0; }
>>>>>>> + virtual void addRelocation(const llvm::MachineRelocation&)
>...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...rPtr);
>>>>> + }
>>>>> +
>>>>> + virtual bool finishFunction(MachineFunction &F) {
>>>>> + MCE->setCurrentPtr(CurBufferPtr);
>>>>> + return false;
>>>>> + }
>>>>> + virtual void startFunctionStub(unsigned StubSize, unsigned
>>>>> Alignment) {}
>>>>> + virtual void *finishFunctionStub(const Function *F) { return
>>>>> 0; }
>>>>> + virtual void addRelocation(const llvm::MachineRelocation&) { }
>>>>> + virtual...
2008 Apr 07
2
[LLVMdev] Being able to know the jitted code-size before emitting
...>>>>>>> + virtual bool finishFunction(MachineFunction &F) {
>>>>>>>> + MCE->setCurrentPtr(CurBufferPtr);
>>>>>>>> + return false;
>>>>>>>> + }
>>>>>>>> + virtual void startFunctionStub(unsigned StubSize, unsigned
>>>>>>>> Alignment) {}
>>>>>>>> + virtual void *finishFunctionStub(const Function *F) { return
>>>>>>>> 0; }
>>>>>>>> + virtual void addRelocation(const llvm::MachineRelocat...
2008 Apr 07
0
[LLVMdev] Being able to know the jitted code-size before emitting
...>>> + virtual bool finishFunction(MachineFunction &F) {
>>>>>>>>> + MCE->setCurrentPtr(CurBufferPtr);
>>>>>>>>> + return false;
>>>>>>>>> + }
>>>>>>>>> + virtual void startFunctionStub(unsigned StubSize, unsigned
>>>>>>>>> Alignment) {}
>>>>>>>>> + virtual void *finishFunctionStub(const Function *F)
>>>>>>>>> { return
>>>>>>>>> 0; }
>>>>>>>>> +...