diff options
| author | Andrea Corallo | 2019-06-12 03:54:59 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:33:41 +0100 |
| commit | 87bf022f2f5457febf23c2ce792c549928771bbd (patch) | |
| tree | 84e537d90aa64383c85d3165d168d3ba1729f992 /src | |
| parent | 203b6ce9fa148ca05fc2688a8a1a607dc922acd7 (diff) | |
| download | emacs-87bf022f2f5457febf23c2ce792c549928771bbd.tar.gz emacs-87bf022f2f5457febf23c2ce792c549928771bbd.zip | |
fix prologue strategy
Diffstat (limited to 'src')
| -rw-r--r-- | src/comp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/comp.c b/src/comp.c index a14056e4c58..97b617ce2be 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -70,7 +70,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 70 | #define PUSH_PARAM(obj) \ | 70 | #define PUSH_PARAM(obj) \ |
| 71 | do { \ | 71 | do { \ |
| 72 | CHECK_STACK; \ | 72 | CHECK_STACK; \ |
| 73 | gcc_jit_block_add_assignment (bb_map[0].gcc_bb, \ | 73 | gcc_jit_block_add_assignment (prologue_bb, \ |
| 74 | NULL, \ | 74 | NULL, \ |
| 75 | *stack, \ | 75 | *stack, \ |
| 76 | gcc_jit_param_as_rvalue(obj)); \ | 76 | gcc_jit_param_as_rvalue(obj)); \ |
| @@ -729,7 +729,7 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length, | |||
| 729 | gcc_jit_rvalue *args[4]; | 729 | gcc_jit_rvalue *args[4]; |
| 730 | unsigned op; | 730 | unsigned op; |
| 731 | 731 | ||
| 732 | /* This is the stack we use to flat the bytecode written for push and pop | 732 | /* Meta-stack we use to flat the bytecode written for push and pop |
| 733 | Emacs VM.*/ | 733 | Emacs VM.*/ |
| 734 | gcc_jit_lvalue **stack_base, **stack, **stack_over; | 734 | gcc_jit_lvalue **stack_base, **stack, **stack_over; |
| 735 | stack_base = stack = | 735 | stack_base = stack = |
| @@ -772,10 +772,14 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length, | |||
| 772 | local_name); | 772 | local_name); |
| 773 | } | 773 | } |
| 774 | 774 | ||
| 775 | gcc_jit_block *prologue_bb = | ||
| 776 | gcc_jit_function_new_block (comp.func, "prologue"); | ||
| 777 | |||
| 775 | basic_block_t *bb_map = compute_bblocks (bytestr_length, bytestr_data); | 778 | basic_block_t *bb_map = compute_bblocks (bytestr_length, bytestr_data); |
| 776 | 779 | ||
| 777 | for (ptrdiff_t i = 0; i < comp_res.max_args; ++i) | 780 | for (ptrdiff_t i = 0; i < comp_res.max_args; ++i) |
| 778 | PUSH_PARAM (gcc_jit_function_get_param (comp.func, i)); | 781 | PUSH_PARAM (gcc_jit_function_get_param (comp.func, i)); |
| 782 | gcc_jit_block_end_with_jump (prologue_bb, NULL, bb_map[0].gcc_bb); | ||
| 779 | 783 | ||
| 780 | gcc_jit_rvalue *nil = comp_lisp_obj_as_ptr_from_ptr (&bb_map[0], Qnil); | 784 | gcc_jit_rvalue *nil = comp_lisp_obj_as_ptr_from_ptr (&bb_map[0], Qnil); |
| 781 | 785 | ||