search for: function_entry

Displaying 2 results from an estimated 2 matches for "function_entry".

2010 Apr 07
3
[LLVMdev] Injecting code before function prolog
...he link above, but my intention is to pass the current stack limit as the first argument to the function. What I'm hoping to do is to be able to inject the following code (in x86 asm, c calling convention) on entry to each function: _foo: lea -frame_size(%esp), %eax cmpl %eax, 4(%esp) jb function_entry // handle overflow function_entry: function prolog ... The problem I'm encountering is how to force this before the prolog. I'm attempting to add a machine function pass after the emit prolog/epilog pass that injects this code, but directly injecting x86 code seems to be very messy a...
2010 Apr 10
0
[LLVMdev] Injecting code before function prolog
...o pass the current stack limit > as the first argument to the function. > > What I'm hoping to do is to be able to inject the following code (in > x86 asm, c calling convention) on entry to each function: > _foo: >  lea -frame_size(%esp), %eax >  cmpl %eax, 4(%esp) >  jb function_entry >  // handle overflow > function_entry: >  function prolog >  ... > > The problem I'm encountering is how to force this before the prolog. > I'm attempting to add a machine function pass after the emit > prolog/epilog pass that injects this code, but directly injecti...