Intel P6 vs P7 system call performance
Quoted 7 lines
Not true. A ret(urn) is (sort of) equivalent to 'pop %eip'. The above code would actually jump to address
0xfffff000, but probably be slow since it confuses the branch prediction.Bart
that being the case, then the original code that Linus put forth:
pushl $0xfffff000
call *(%esp)
add $4,%espwould be the way to go as it is highly readable. actually, the code at 0xfffff000 could issue a ret $4 and eliminate the add after the call.