diff options
| author | Andrea Corallo | 2019-06-26 22:28:56 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:33:46 +0100 |
| commit | 5e3b3e95a9e5b9f269f123fc41f43f411d4c19d9 (patch) | |
| tree | cffa3944a394ad2f1e1256fc8f8b080558d37e7c /src | |
| parent | 0b7ea165471091d4f998f7bc8cdcda9e27bde531 (diff) | |
| download | emacs-5e3b3e95a9e5b9f269f123fc41f43f411d4c19d9.tar.gz emacs-5e3b3e95a9e5b9f269f123fc41f43f411d4c19d9.zip | |
add uintptr_type
Diffstat (limited to 'src')
| -rw-r--r-- | src/comp.c | 13 |
1 files changed, 12 insertions, 1 deletions
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 { | |||
| 187 | gcc_jit_type *void_ptr_type; | 187 | gcc_jit_type *void_ptr_type; |
| 188 | gcc_jit_type *char_ptr_type; | 188 | gcc_jit_type *char_ptr_type; |
| 189 | gcc_jit_type *ptrdiff_type; | 189 | gcc_jit_type *ptrdiff_type; |
| 190 | gcc_jit_type *uintptr_type; | ||
| 190 | gcc_jit_type *lisp_obj_type; | 191 | gcc_jit_type *lisp_obj_type; |
| 191 | gcc_jit_type *lisp_obj_ptr_type; | 192 | gcc_jit_type *lisp_obj_ptr_type; |
| 192 | gcc_jit_field *lisp_obj_as_ptr; | 193 | gcc_jit_field *lisp_obj_as_ptr; |
| @@ -1649,9 +1650,19 @@ init_comp (int opt_level) | |||
| 1649 | ptrdiff_t_gcc = GCC_JIT_TYPE_LONG_LONG; | 1650 | ptrdiff_t_gcc = GCC_JIT_TYPE_LONG_LONG; |
| 1650 | else | 1651 | else |
| 1651 | eassert ("ptrdiff_t size not handled."); | 1652 | eassert ("ptrdiff_t size not handled."); |
| 1652 | |||
| 1653 | comp.ptrdiff_type = gcc_jit_context_get_type (comp.ctxt, ptrdiff_t_gcc); | 1653 | comp.ptrdiff_type = gcc_jit_context_get_type (comp.ctxt, ptrdiff_t_gcc); |
| 1654 | 1654 | ||
| 1655 | enum gcc_jit_types uintptr_t_gcc; | ||
| 1656 | if (sizeof (uintptr_t) == sizeof (unsigned)) | ||
| 1657 | uintptr_t_gcc = GCC_JIT_TYPE_UNSIGNED_INT; | ||
| 1658 | else if (sizeof (uintptr_t) == sizeof (unsigned long)) | ||
| 1659 | uintptr_t_gcc = GCC_JIT_TYPE_UNSIGNED_LONG; | ||
| 1660 | else if (sizeof (uintptr_t) == sizeof (unsigned long long)) | ||
| 1661 | uintptr_t_gcc = GCC_JIT_TYPE_UNSIGNED_LONG_LONG; | ||
| 1662 | else | ||
| 1663 | eassert ("uintptr_t size not handled."); | ||
| 1664 | comp.uintptr_type = gcc_jit_context_get_type (comp.ctxt, uintptr_t_gcc); | ||
| 1665 | |||
| 1655 | comp.func_hash = CALLN (Fmake_hash_table, QCtest, Qequal, QCweakness, Qt); | 1666 | comp.func_hash = CALLN (Fmake_hash_table, QCtest, Qequal, QCweakness, Qt); |
| 1656 | 1667 | ||
| 1657 | /* Define data structures. */ | 1668 | /* Define data structures. */ |