mapi: split entry_generate_or_patch for x86 tls