From: Andrea Corallo Date: Sun, 23 Jun 2019 14:41:04 +0000 (+0200) Subject: fix awful pad hack in define_handler_struct X-Git-Tag: emacs-28.0.90~2727^2~1453 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0406c74b6083e0ddf08e386d935c07f6493e41d4;p=emacs.git fix awful pad hack in define_handler_struct --- diff --git a/src/comp.c b/src/comp.c index aee7ca99463..fe3fac606d9 100644 --- a/src/comp.c +++ b/src/comp.c @@ -818,56 +818,37 @@ define_handler_struct (void) comp.handler_ptr_type, "next"); gcc_jit_field *fields[] = - { gcc_jit_context_new_field (comp.ctxt, - NULL, - comp.int_type, - "type"), - gcc_jit_context_new_field (comp.ctxt, - NULL, - comp.lisp_obj_type, - "tag_or_ch"), - gcc_jit_context_new_field (comp.ctxt, - NULL, - comp.int_type, - "nonlocal_exit"), + { gcc_jit_context_new_field ( + comp.ctxt, + NULL, + gcc_jit_context_new_array_type (comp.ctxt, + NULL, + comp.char_type, + offsetof (struct handler, val)), + "pad0"), comp.handler_val_field, comp.handler_next_field, - gcc_jit_context_new_field (comp.ctxt, - NULL, - comp.handler_ptr_type, - "nextfree"), - gcc_jit_context_new_field (comp.ctxt, - NULL, - comp.lisp_obj_ptr_type, - "bytecode_top"), - gcc_jit_context_new_field (comp.ctxt, - NULL, - comp.int_type, - "bytecode_dest"), - gcc_jit_context_new_field (comp.ctxt, - NULL, - gcc_jit_context_new_array_type (comp.ctxt, - NULL, - comp.char_type, - 4), - "pad"), + gcc_jit_context_new_field ( + comp.ctxt, + NULL, + gcc_jit_context_new_array_type (comp.ctxt, + NULL, + comp.char_type, + offsetof (struct handler, jmp) + - offsetof (struct handler, next) + - sizeof (((struct handler *) 0)->next)), + "pad1"), comp.handler_jmp_field, - gcc_jit_context_new_field (comp.ctxt, - NULL, - comp.emacs_int_type, - "f_lisp_eval_depth"), - gcc_jit_context_new_field (comp.ctxt, - NULL, - comp.ptrdiff_type, - "pdlcount"), - gcc_jit_context_new_field (comp.ctxt, - NULL, - comp.int_type, - "poll_suppress_count"), - gcc_jit_context_new_field (comp.ctxt, - NULL, - comp.int_type, - "interrupt_input_blocked") }; + gcc_jit_context_new_field ( + comp.ctxt, + NULL, + gcc_jit_context_new_array_type (comp.ctxt, + NULL, + comp.char_type, + sizeof (struct handler) + - offsetof (struct handler, jmp) + - sizeof (((struct handler *) 0)->jmp)), + "pad2") }; gcc_jit_struct_set_fields (comp.handler, NULL, sizeof (fields) / sizeof (*fields),