Skip to contentSkip to conversation

Intel P6 vs P7 system call performance

DISCUSSION [email protected] 1 participant 1 message Dec 19, 2002

lore
Share & tools
lore
#0 lore raw
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,%esp

would 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.