← Back to context

Comment by mananaysiempre

1 month ago

Why oh why isn’t 'uecker still pushing his GCC patch[1] enabling -fno-trampolines (i.e. function descriptors) for C. I know it’s an ABI break, but it would be so nice :(

Long story short:

  # (*funp)();
     testl #1, %eax
     jz    1f
     movq  8(%eax), r10
     movq  (%eax), %eax
  1: callq *%eax

[1] https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00853.h...

(I think this is my personal record wrt the relative number of errors in a short code snippet. You get the idea, and I’m frankly afraid to try and post a fixed version at this point :) )