x86_init_func_common: Add ENDBR at function entry
[mesa.git] / src / gallium / auxiliary / rtasm / rtasm_x86sse.c
index 27ee8f1242a60a621ab6826910b59a2a55f970cd..ad687f32853a1b8e974db44ca0134aa8ebbd9733 100644 (file)
@@ -2165,6 +2165,11 @@ static void x86_init_func_common( struct x86_function *p )
    if(util_cpu_caps.has_sse4_1)
       p->caps |= X86_SSE4_1;
    p->csr = p->store;
+#if defined(PIPE_ARCH_X86)
+   emit_1i(p, 0xfb1e0ff3);
+#else
+   emit_1i(p, 0xfa1e0ff3);
+#endif
    DUMP_START();
 }
 
@@ -2203,7 +2208,7 @@ voidptr_to_x86_func(void *v)
       void *v;
       x86_func f;
    } u;
-   assert(sizeof(u.v) == sizeof(u.f));
+   STATIC_ASSERT(sizeof(u.v) == sizeof(u.f));
    u.v = v;
    return u.f;
 }