search for: get_eip

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

Did you mean: get_eip0
2011 Jan 04
4
[LLVMdev] Is PIC code defeating the branch predictor?
...near returns, and far calls must be matched with far returns. Pushing the return address on the stack and jumping to the routine to be called is not recommended since it creates a mismatch in calls and returns." Is this a known issue or a non-issue? An alternative approach would be: calll get_eip movl %eax, -24(%ebp) ## 4-byte Spill ... get_eip: movl (%esp), %eax ret More here: http://software.intel.com/en-us/blogs/2010/10/25/zero-length-calls-can-tank-atom-processor-performance/ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type...
2014 Jan 03
1
PATCH: match calls and returns
.....you must make sure that all calls are matched with returns. Never jump out of a subroutine without a return and never use a return as an indirect jump." (see paragraph 3.15 in microarchitecture.pdf and examples 3.5a and 3.5b in optimizing_assembly.pdf) Basically this patch replaces call .get_eip0 .get_eip0: pop eax with call .mov_eip_to_eax .get_eip0: and .mov_eip_to_eax: mov eax, [esp] ret -------------- next part -------------- A non-text attachment was scrubbed... Name: get_eip.diff Type: application/octet-stream Size: 2054 bytes Desc: not available Url : http://lists....