divide code in set_trampoline for each architecture