diff options
| author | Andrea Corallo | 2019-09-17 01:01:34 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:37:49 +0100 |
| commit | 69cbf2b2f304f82c6d77cd663d4211bf125ebe74 (patch) | |
| tree | de6bce26ee9363fc4f556867e0bc91d7cdf38bb3 /src/comp.c | |
| parent | 83a146b24ec230539c4520a4315b8bcdeebdb434 (diff) | |
| download | emacs-69cbf2b2f304f82c6d77cd663d4211bf125ebe74.tar.gz emacs-69cbf2b2f304f82c6d77cd663d4211bf125ebe74.zip | |
keep on fixing ssa
Diffstat (limited to 'src/comp.c')
| -rw-r--r-- | src/comp.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/comp.c b/src/comp.c index 2846037e5a0..8aadd5acc91 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -1265,6 +1265,10 @@ emit_limple_insn (Lisp_Object insn) | |||
| 1265 | n); | 1265 | n); |
| 1266 | emit_cond_jump (test, target2, target1); | 1266 | emit_cond_jump (test, target2, target1); |
| 1267 | } | 1267 | } |
| 1268 | else if (EQ (op, Qphi)) | ||
| 1269 | { | ||
| 1270 | /* Nothing to do for phis into the backend. */ | ||
| 1271 | } | ||
| 1268 | else if (EQ (op, Qpush_handler)) | 1272 | else if (EQ (op, Qpush_handler)) |
| 1269 | { | 1273 | { |
| 1270 | EMACS_UINT clobber_slot = XFIXNUM (FUNCALL1 (comp-mvar-slot, arg0)); | 1274 | EMACS_UINT clobber_slot = XFIXNUM (FUNCALL1 (comp-mvar-slot, arg0)); |
| @@ -1350,7 +1354,7 @@ emit_limple_insn (Lisp_Object insn) | |||
| 1350 | else if (EQ (op, Qset_args_to_local)) | 1354 | else if (EQ (op, Qset_args_to_local)) |
| 1351 | { | 1355 | { |
| 1352 | /* | 1356 | /* |
| 1353 | Limple: (set-args-to-local 1) | 1357 | Limple: (set-args-to-local #s(comp-mvar 1 6 nil nil nil nil)) |
| 1354 | C: local[1] = *args; | 1358 | C: local[1] = *args; |
| 1355 | */ | 1359 | */ |
| 1356 | gcc_jit_rvalue *gcc_args = | 1360 | gcc_jit_rvalue *gcc_args = |
| @@ -1360,7 +1364,7 @@ emit_limple_insn (Lisp_Object insn) | |||
| 1360 | gcc_jit_rvalue *res = | 1364 | gcc_jit_rvalue *res = |
| 1361 | gcc_jit_lvalue_as_rvalue (gcc_jit_rvalue_dereference (gcc_args, NULL)); | 1365 | gcc_jit_lvalue_as_rvalue (gcc_jit_rvalue_dereference (gcc_args, NULL)); |
| 1362 | 1366 | ||
| 1363 | EMACS_UINT slot_n = XFIXNUM (arg0); | 1367 | EMACS_UINT slot_n = XFIXNUM (FUNCALL1 (comp-mvar-slot, arg0)); |
| 1364 | gcc_jit_block_add_assignment (comp.block, | 1368 | gcc_jit_block_add_assignment (comp.block, |
| 1365 | NULL, | 1369 | NULL, |
| 1366 | comp.frame[slot_n], | 1370 | comp.frame[slot_n], |
| @@ -1369,13 +1373,15 @@ emit_limple_insn (Lisp_Object insn) | |||
| 1369 | else if (EQ (op, Qset_rest_args_to_local)) | 1373 | else if (EQ (op, Qset_rest_args_to_local)) |
| 1370 | { | 1374 | { |
| 1371 | /* | 1375 | /* |
| 1372 | Limple: (set-rest-args-to-local 3) | 1376 | Limple: (set-rest-args-to-local #s(comp-mvar 2 9 nil nil nil nil)) |
| 1373 | C: local[3] = list (nargs - 3, args); | 1377 | C: local[2] = list (nargs - 2, args); |
| 1374 | */ | 1378 | */ |
| 1379 | |||
| 1380 | EMACS_UINT slot_n = XFIXNUM (FUNCALL1 (comp-mvar-slot, arg0)); | ||
| 1375 | gcc_jit_rvalue *n = | 1381 | gcc_jit_rvalue *n = |
| 1376 | gcc_jit_context_new_rvalue_from_int (comp.ctxt, | 1382 | gcc_jit_context_new_rvalue_from_int (comp.ctxt, |
| 1377 | comp.ptrdiff_type, | 1383 | comp.ptrdiff_type, |
| 1378 | XFIXNUM (arg0)); | 1384 | slot_n); |
| 1379 | gcc_jit_lvalue *nargs = | 1385 | gcc_jit_lvalue *nargs = |
| 1380 | gcc_jit_param_as_lvalue (gcc_jit_function_get_param (comp.func, 0)); | 1386 | gcc_jit_param_as_lvalue (gcc_jit_function_get_param (comp.func, 0)); |
| 1381 | gcc_jit_lvalue *args = | 1387 | gcc_jit_lvalue *args = |
| @@ -1395,7 +1401,7 @@ emit_limple_insn (Lisp_Object insn) | |||
| 1395 | 1401 | ||
| 1396 | gcc_jit_block_add_assignment (comp.block, | 1402 | gcc_jit_block_add_assignment (comp.block, |
| 1397 | NULL, | 1403 | NULL, |
| 1398 | comp.frame[XFIXNUM (arg0)], | 1404 | comp.frame[slot_n], |
| 1399 | res); | 1405 | res); |
| 1400 | } | 1406 | } |
| 1401 | else if (EQ (op, Qinc_args)) | 1407 | else if (EQ (op, Qinc_args)) |
| @@ -3274,6 +3280,7 @@ syms_of_comp (void) | |||
| 3274 | DEFSYM (Qreturn, "return"); | 3280 | DEFSYM (Qreturn, "return"); |
| 3275 | DEFSYM (Qcomp_mvar, "comp-mvar"); | 3281 | DEFSYM (Qcomp_mvar, "comp-mvar"); |
| 3276 | DEFSYM (Qcond_jump, "cond-jump"); | 3282 | DEFSYM (Qcond_jump, "cond-jump"); |
| 3283 | DEFSYM (Qphi, "phi"); | ||
| 3277 | /* In use for prologue emission. */ | 3284 | /* In use for prologue emission. */ |
| 3278 | DEFSYM (Qset_par_to_local, "set-par-to-local"); | 3285 | DEFSYM (Qset_par_to_local, "set-par-to-local"); |
| 3279 | DEFSYM (Qset_args_to_local, "set-args-to-local"); | 3286 | DEFSYM (Qset_args_to_local, "set-args-to-local"); |