add test for addFunction
autogenerate invoke_* functions for asm