diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-04-02 10:42:24 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-04-02 10:42:24 +0000 |
commit | a3f73acb9d2cdc62692af7ff93c51f910dff2d0d (patch) | |
tree | 303d205e8e6ed9676bdcbe006a402c23bf668f6c /lib/mesa/src/mapi/entry_ppc64le_tsd.h | |
parent | f54e142455cb3c9d1662dae7e096a32a47e5409b (diff) |
Merge Mesa 23.3.6
Diffstat (limited to 'lib/mesa/src/mapi/entry_ppc64le_tsd.h')
-rw-r--r-- | lib/mesa/src/mapi/entry_ppc64le_tsd.h | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/mesa/src/mapi/entry_ppc64le_tsd.h b/lib/mesa/src/mapi/entry_ppc64le_tsd.h index a583b93e5..577307972 100644 --- a/lib/mesa/src/mapi/entry_ppc64le_tsd.h +++ b/lib/mesa/src/mapi/entry_ppc64le_tsd.h @@ -104,7 +104,6 @@ __asm__(".text\n" #ifndef MAPI_MODE_BRIDGE #include <string.h> -#include "u_execmem.h" void entry_patch_public(void) @@ -180,31 +179,4 @@ static const uint64_t TEMPLATE_OFFSET_CURRENT_TABLE = sizeof(code_templ) - 3*8; static const uint64_t TEMPLATE_OFFSET_CURRENT_TABLE_GET = sizeof(code_templ) - 2*8; static const uint64_t TEMPLATE_OFFSET_SLOT = sizeof(code_templ) - 1*8; -void -entry_patch(mapi_func entry, int slot) -{ - char *code = (char *) entry; - *((uint64_t *) (code + TEMPLATE_OFFSET_CURRENT_TABLE)) = (uint64_t) ENTRY_CURRENT_TABLE; - *((uint64_t *) (code + TEMPLATE_OFFSET_CURRENT_TABLE_GET)) = (uint64_t) ENTRY_CURRENT_TABLE_GET; - *((uint64_t *) (code + TEMPLATE_OFFSET_SLOT)) = slot * sizeof(mapi_func); -} - -mapi_func -entry_generate(int slot) -{ - char *code; - mapi_func entry; - - code = u_execmem_alloc(sizeof(code_templ)); - if (!code) - return NULL; - - memcpy(code, code_templ, sizeof(code_templ)); - - entry = (mapi_func) code; - entry_patch(entry, slot); - - return entry; -} - #endif /* MAPI_MODE_BRIDGE */ |