diff options
| author | Andrea Corallo | 2020-11-27 18:31:53 +0100 |
|---|---|---|
| committer | Andrea Corallo | 2020-11-27 22:59:50 +0100 |
| commit | e2ff5d9605624baeae0fa500b00078b9f3e42e07 (patch) | |
| tree | be5ad76c6c1bd3d3308f8d35176511bb66a828e5 /src | |
| parent | 949b49cf771e8f38b23adb3fa4f9d7a9a5e290da (diff) | |
| download | emacs-e2ff5d9605624baeae0fa500b00078b9f3e42e07.tar.gz emacs-e2ff5d9605624baeae0fa500b00078b9f3e42e07.zip | |
* Synthesize as const primitive function pointers and its container struct.
* src/comp.c (declare_imported_func): Make const function pointer
to primitive funcions.
(emit_ctxt_code): Make struct 'comp.func_relocs' const.
Diffstat (limited to 'src')
| -rw-r--r-- | src/comp.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/comp.c b/src/comp.c index 99560cc13a1..12ff985d230 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -967,12 +967,13 @@ declare_imported_func (Lisp_Object subr_sym, gcc_jit_type *ret_type, | |||
| 967 | subr_sym, make_string ("R", 1)); | 967 | subr_sym, make_string ("R", 1)); |
| 968 | 968 | ||
| 969 | gcc_jit_type *f_ptr_type = | 969 | gcc_jit_type *f_ptr_type = |
| 970 | gcc_jit_context_new_function_ptr_type (comp.ctxt, | 970 | gcc_jit_type_get_const ( |
| 971 | NULL, | 971 | gcc_jit_context_new_function_ptr_type (comp.ctxt, |
| 972 | ret_type, | 972 | NULL, |
| 973 | nargs, | 973 | ret_type, |
| 974 | types, | 974 | nargs, |
| 975 | 0); | 975 | types, |
| 976 | 0)); | ||
| 976 | gcc_jit_field *field = | 977 | gcc_jit_field *field = |
| 977 | gcc_jit_context_new_field (comp.ctxt, | 978 | gcc_jit_context_new_field (comp.ctxt, |
| 978 | NULL, | 979 | NULL, |
| @@ -2866,7 +2867,9 @@ emit_ctxt_code (void) | |||
| 2866 | comp.ctxt, | 2867 | comp.ctxt, |
| 2867 | NULL, | 2868 | NULL, |
| 2868 | GCC_JIT_GLOBAL_EXPORTED, | 2869 | GCC_JIT_GLOBAL_EXPORTED, |
| 2869 | gcc_jit_type_get_pointer (gcc_jit_struct_as_type (f_reloc_struct)), | 2870 | gcc_jit_type_get_pointer ( |
| 2871 | gcc_jit_type_get_const ( | ||
| 2872 | gcc_jit_struct_as_type (f_reloc_struct))), | ||
| 2870 | FUNC_LINK_TABLE_SYM); | 2873 | FUNC_LINK_TABLE_SYM); |
| 2871 | 2874 | ||
| 2872 | xfree (fields); | 2875 | xfree (fields); |