Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sure you can.

Just write an asm stub to call, that sets up ecx and other things right.



The claim was: The same goes for C++ or Swift. Getting the function pointer for a method can be involved, but all functions adhere to the C ABI.

This is clearly false since at least one C++ compiler generates functions that does not adhere to any of the common calling conventions for C on that platform (or "C ABIs" if you will).

Besides that, I said you could not call them from C. An asm stub is not C. Neither is inline assembly even though it's a common extension to C.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: