From: Andrea Corallo Date: Wed, 26 Jun 2019 20:28:56 +0000 (+0200) Subject: add uintptr_type X-Git-Tag: emacs-28.0.90~2727^2~1427 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5e3b3e95a9e5b9f269f123fc41f43f411d4c19d9;p=emacs.git add uintptr_type --- diff --git a/src/comp.c b/src/comp.c index 203d476df15..5df67fe55f7 100644 --- a/src/comp.c +++ b/src/comp.c @@ -187,6 +187,7 @@ typedef struct { gcc_jit_type *void_ptr_type; gcc_jit_type *char_ptr_type; gcc_jit_type *ptrdiff_type; + gcc_jit_type *uintptr_type; gcc_jit_type *lisp_obj_type; gcc_jit_type *lisp_obj_ptr_type; gcc_jit_field *lisp_obj_as_ptr; @@ -1649,9 +1650,19 @@ init_comp (int opt_level) ptrdiff_t_gcc = GCC_JIT_TYPE_LONG_LONG; else eassert ("ptrdiff_t size not handled."); - comp.ptrdiff_type = gcc_jit_context_get_type (comp.ctxt, ptrdiff_t_gcc); + enum gcc_jit_types uintptr_t_gcc; + if (sizeof (uintptr_t) == sizeof (unsigned)) + uintptr_t_gcc = GCC_JIT_TYPE_UNSIGNED_INT; + else if (sizeof (uintptr_t) == sizeof (unsigned long)) + uintptr_t_gcc = GCC_JIT_TYPE_UNSIGNED_LONG; + else if (sizeof (uintptr_t) == sizeof (unsigned long long)) + uintptr_t_gcc = GCC_JIT_TYPE_UNSIGNED_LONG_LONG; + else + eassert ("uintptr_t size not handled."); + comp.uintptr_type = gcc_jit_context_get_type (comp.ctxt, uintptr_t_gcc); + comp.func_hash = CALLN (Fmake_hash_table, QCtest, Qequal, QCweakness, Qt); /* Define data structures. */