diff options
| author | Andrea Corallo | 2019-08-15 18:40:42 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:34:00 +0100 |
| commit | b30bbf030bacdb0b66c0296d1368db7b4c07558c (patch) | |
| tree | dc6f6895107cb4363459f792c775044715b30840 /src/comp.c | |
| parent | 643771818e36a8448744f061184cb3411b13291e (diff) | |
| download | emacs-b30bbf030bacdb0b66c0296d1368db7b4c07558c.tar.gz emacs-b30bbf030bacdb0b66c0296d1368db7b4c07558c.zip | |
inline consp
Diffstat (limited to 'src/comp.c')
| -rw-r--r-- | src/comp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/comp.c b/src/comp.c index fa242a85e3b..fed777e9e0b 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -1397,6 +1397,18 @@ emit_sub1 (Lisp_Object insn) | |||
| 1397 | return gcc_jit_context_new_call (comp.ctxt, NULL, comp.sub1, 1, &n); | 1397 | return gcc_jit_context_new_call (comp.ctxt, NULL, comp.sub1, 1, &n); |
| 1398 | } | 1398 | } |
| 1399 | 1399 | ||
| 1400 | static gcc_jit_rvalue * | ||
| 1401 | emit_consp (Lisp_Object insn) | ||
| 1402 | { | ||
| 1403 | gcc_jit_rvalue *x = emit_mvar_val (SECOND (insn)); | ||
| 1404 | gcc_jit_rvalue *res = emit_cast (comp.bool_type, | ||
| 1405 | emit_CONSP (x)); | ||
| 1406 | return gcc_jit_context_new_call (comp.ctxt, | ||
| 1407 | NULL, | ||
| 1408 | comp.bool_to_lisp_obj, | ||
| 1409 | 1, &res); | ||
| 1410 | } | ||
| 1411 | |||
| 1400 | 1412 | ||
| 1401 | /****************************************************************/ | 1413 | /****************************************************************/ |
| 1402 | /* Inline function definition and lisp data structure follows. */ | 1414 | /* Inline function definition and lisp data structure follows. */ |
| @@ -2206,6 +2218,7 @@ DEFUN ("comp-init-ctxt", Fcomp_init_ctxt, Scomp_init_ctxt, | |||
| 2206 | emit_simple_limple_call_void_ret); | 2218 | emit_simple_limple_call_void_ret); |
| 2207 | register_emitter (QFadd1, emit_add1); | 2219 | register_emitter (QFadd1, emit_add1); |
| 2208 | register_emitter (QFsub1, emit_sub1); | 2220 | register_emitter (QFsub1, emit_sub1); |
| 2221 | register_emitter (QFconsp, emit_consp); | ||
| 2209 | } | 2222 | } |
| 2210 | 2223 | ||
| 2211 | comp.ctxt = gcc_jit_context_acquire(); | 2224 | comp.ctxt = gcc_jit_context_acquire(); |
| @@ -2608,6 +2621,7 @@ syms_of_comp (void) | |||
| 2608 | DEFSYM (Qhelper_save_restriction, "helper_save_restriction"); | 2621 | DEFSYM (Qhelper_save_restriction, "helper_save_restriction"); |
| 2609 | DEFSYM (QFadd1, "Fadd1"); | 2622 | DEFSYM (QFadd1, "Fadd1"); |
| 2610 | DEFSYM (QFsub1, "Fsub1"); | 2623 | DEFSYM (QFsub1, "Fsub1"); |
| 2624 | DEFSYM (QFconsp, "Fconsp"); | ||
| 2611 | 2625 | ||
| 2612 | defsubr (&Scomp_init_ctxt); | 2626 | defsubr (&Scomp_init_ctxt); |
| 2613 | defsubr (&Scomp_release_ctxt); | 2627 | defsubr (&Scomp_release_ctxt); |