-
Notifications
You must be signed in to change notification settings - Fork 8
/
ChangeLog
3615 lines (2493 loc) · 133 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2020-05-10 Jakob Löw <jakob@m4gnus.de>
* jit/jit-block.c: add missing inversions of OP_BR_IFALSE and
OP_BR_ITRUE to _jit_invert_condition.
2020-04-17 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit.h: Include jit-dump.h and jit-memory.h headers.
* jit/jit-memory-cache.c: make all _jit_cache_* functions static
and remove the prefix. Remove commented out code.
2020-01-09 Tom Tromey <tom@tromey.com>
* include/jit/jit-function.h (jit_optimize, jit_compile)
(jit_compile_entry): Declare.
* include/jit/jit-intrinsic.h (jit_int_div_ovf, jit_int_rem_ovf)
(jit_uint_div_ovf, jit_uint_rem_ovf, jit_long_div_ovf)
(jit_long_rem_ovf, jit_ulong_div_ovf, jit_ulong_rem_ovf):
Declare.
* tests/unit/Makefile.am (check-local): New target.
* tests/unit/make-includes-test: New file.
2020-01-06 Tom Tromey <tom@tromey.com>
* tests/unit/Makefile.am (jitlib, AM_CFLAGS, check_PROGRAMS)
(cfg_tests_SOURCES, cfg_tests_LDADD): New variables.
* tests/unit/unit-tests.h: New file.
* tests/unit/cfg-tests.c: New file.
2019-12-27 Tom Tromey <tom@tromey.com>
* jit/jit-block.c (_jit_invert_condition): New function.
(_jit_block_clean_cfg): Optimize branch-around-branch.
2020-01-06 Tom Tromey <tom@tromey.com>
* tests/unit/Makefile.am: New file.
* tests/Makefile.am (SUBDIRS): Add "unit".
* configure.ac: Add tests/unit/Makefile.
2019-12-27 Tom Tromey <tom@tromey.com>
* jit/jit-rules-x86-64.c (_jit_gen_load_value): Remove unused
variable.
* jit/jit-elf-read.c (jit_readelf_num_needed)
(jit_readelf_get_needed): Change type of "type".
* jit/jit-apply-x86-64.c (_jit_create_closure): Remove unused
variable.
* jit/jit-apply.c (jit_apply_builder_get_return): Make "size"
conditional.
2019-10-01 Jakob Löw <jakob@m4gnus.de>
* jit/jit-insn.c: Fix a segmentation fault bug when converting byte/short
values to larger ints.
* jit/jit-unwind.c: make sure the address of the next base pointer is
actually on the stack
* jit-rules-x86-64.ins: use lea, inc, dec in the jit instruction
add_relative, add and sub
2019-08-10 Aleksey Demakov <ademakov@gmail.com>
* tools/Makefile.am (gen_ops_SOURCES): reorder targtes wich seems
to mysteriously fix out-of-tree builds.
2019-08-10 Aleksey Demakov <ademakov@gmail.com>
* configure.ac, include/jit/jit-defs.h.in: remove JITINT64CPP macro.
* include/jit/jit-defs.h.in: define jit_size_t as a jit_nuint alias.
* include/jit/jit-memory.h: remove jit_size_t definition.
2018-09-17 Jakob Löw <jakob@m4gnus.de>
* jit/jit-rules-interp.c: Fix the call to _jit_load_opcode passing
more arguments than needed.
2018-09-01 Ken Brown <kbrown@cornell.edu>
* jit/jit-apply-x86.h: Remove reference to __CYGWIN32__. This is
deprecated and unnecessary. It could only cause confusion, since
readers of the code might think it's intended to distinguish
32-bit Cygwin from 64-bit Cygwin.
2018-09-01 Ken Brown <kbrown@cornell.edu>
Don't use Win32 API on Cygwin.
* jit/jit-config.h: Don't define JIT_WIN32_PLATFORM on Cygwin.
Remove the definitions of JIT_WIN32_NATIVE and JIT_WIN32_CYGWIN,
which are no longer needed.
* jit/jit-elf-read.c:
* jit/jit-intrinsic.c:
* jitdynamic/jit-dynlib.c: Replace all uses of JIT_WIN32_NATIVE by
JIT_WIN32_PLATFORM.
* tools/gen-apply-helper.h: Don't define PLATFORM_IS_WIN32 on
Cygwin.
2018-09-01 Ken Brown <kbrown@cornell.edu>
* configure.ac: Don't use -mno-cygwin in the Cygwin build. This
has been unsupported since GCC 4 and causes the build to fail.
* jit/jit-dump.c (dump_object_code): Remove obsolete comment.
* jitdynamic/jit-dynlib.c (jit_dynlib_open): Remove obsolete code.
2018-08-28 Jakob Löw <jakob@m4gnus.de>
* jit-insn.c, jit-insn.h, jit-function.c, jit-function.h, jit-internal.h:
implement nesting using retrieve_frame_pointer and the frame_offset of
values. The frame pointer can either be passed automatically to child
functions when e.g. using jit_insn_call or manually using the new
functions jit_insn_call_nested_indirect, jit_insn_get_frame_pointer,
jit_insn_get_parent_frame_pointer_of or jit_function_set_parent_frame.
* jit-rules-*.ins: implement the retrieve_frame_pointer opcode.
2018-08-25 Aurelien Aptel <aaptel@suse.com>
* jit/jit-rules-x86-64.c (small_block_copy, small_block_set): fix
the build on compilers older than C99.
2018-08-21 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-function.c (jit_function_apply_vararg): fix a warning
(thanks Eli Zaretskii <eliz@gnu.org>).
2018-08-19 Aleksey Demakov <ademakov@gmail.com>
* jitdynamic/libjitdynamic.pc.in (Libs): fix Libs to use jitdynamic
instead of jitplus (thanks Eli Zaretskii <eliz@gnu.org>).
2018-08-15 Aleksey Demakov <ademakov@gmail.com>
* configure.ac: bump version to 0.1.4.
* jit/jit-vmem.c (jit_vmem_commit): fix return value.
2018-03-22 Aleksey Demakov <ademakov@gmail.com>
* tests/misc/minimal.c: add David Meyer's test for a global register
assignment bug on recompilation.
* tests/misc/Makefile.am: add new file.
* configure.ac: and use it.
* jit/jit-compile.c (reset_value): fix that bug.
2018-03-01 Jakob Löw <jakob@m4gnus.de>
* jit/jit-rules-x86-64.c: Fix copying small blocks when the size is not a
multiple of 16.
2018-02-10 Evan Klitzke <evan@eklitzke.org>
* README: fix some typos.
* tools/gen-rules-parser.y, tools/gen-ops-parser.y: use const char* for
yyerror, to allow building with -Werror=format-security.
2018-02-07 Tom Tromey <tom@tromey.com>
* jit/libjit.pc.in, jitplus/libjitplus.pc.in:
* jitdynamic/libjitdynamic.pc.in: add new files.
* configure.ac, jit/Makefile.am, jitplus/Makefile.am
* jitdynamic/Makefile.am: use them.
2018-01-15 Tom Tromey <tom@tromey.com>
* jit/jit-dump.c: Document the need for jit-dump.h.
2018-01-10 David Meyer <pdox@alum.mit.edu>
* jit/jit-apply.c (jit_apply_builder_add_arguments): fix a bug with
nint, ptr and long arguments. Found by abo_junghichi@yahoo.co.jp.
2017-11-23 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86-64.ins (JIT_OP_JUMP_TABLE): Fix space check problen
found by David Meyer <pdox@fb.com>.
2017-10-09 Jakob Löw <jakob@m4gnus.de>
* jit/jit-gen-x86.h, jit/jit-gen-x86-64.h: Always use the 8 bit sign
extended alu instruction encoding when possible, reducing code size
by two bytes when the target register is rax or eax
2017-10-21 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-insn.c (apply_compare): fix (perhaps) constant comparison
problem found by Daniel Schwen <daniel@schwen.de>.
2017-10-09 Jakob Löw <jakob@m4gnus.de>
* jit/jit-rules-arm.ins, jit/jit-rules-x86.ins
* jit/jit-rules-x86-64.ins: don't align the size of an alloca
instruction as the frontend already handles that.
2017-10-07 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86-64.c (small_block_set): fix a bug.
2017-10-02 Ketmar Dark <ketmar@ketmar.no-ip.org>
* jit/jit-thread.c (_jit_thread_init): fix thread init on windows.
2017-10-01 Jakob Löw <jakob@m4gnus.de>
* jit/jit-gen-x86-64.h: add the movlhps and movhlps instructions
* jit/jit-rules-x86-64.ins, jit/jit-rules-x86-64.c: inline memset
instructions when value and size are known during compilation.
2017-08-28 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-value.c (jit_value_create_long_constant): on 64-bit
platforms set is_nint_constant flag for long constants.
2017-08-27 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-insn.c: massive changes in coding style and conventions.
Most notably drop checks for null value and insn arguments. It is
now caller's responsibility to provide valid pointers.
* jit/jit-value.c: likewise.
2017-08-24 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-insn.c (jit_insn_load_small): remove function.
* jitplus/jit-plus-function.cpp (insn_load_small): likewise.
2017-08-22 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-opcode-apply.c (_jit_opcode_apply_unary): add function
that computes unary constant ops. Remove redundant if-conditions in
the opcode wrappers.
2017-08-15 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-type.c (jit_type_return_via_pointer): replace the call to
jit_type_normalize call with jit_type_remove_tags.
* jit/jit-apply.c (jit_type_get_max_arg_size, jit_apply)
(jit_apply_builder_add_arguments, jit_apply_raw): likewise.
* jit/jit-reg-alloc.c (_jit_regs_load_value): likewise.
* jit/jit-rules-interp.c (_jit_create_entry_insns):
(_jit_create_call_setup_insns, _jit_create_call_return_insns)
(_jit_interp_calculate_arg_size): likewise.
* jit/jit-insn.c (jit_insn_set_param_ptr, jit_insn_return_ptr)
(jit_insn_push_ptr, jit_insn_call_native): likewise.
* jit/jit-value.c (jit_value_get_struct_pointer):
(jit_value_is_true): likewise.
(jit_value_create_nint_constant): cleanup.
2017-08-06 Jakob Löw <jakob@m4gnus.de>
* jit/jit-insn.c (apply_unary_arith, apply_arith, apply_shift)
(apply_compare): for constant arguments compute constant result at
the function build time.
2017-05-25 George Barrett <bob@bob131.so>
* configure.ac: autotools currently defaults to the parallel test
harness. So add the serial test option to AM_INIT_AUTOMAKE.
2017-05-15 Sebastien Alaiwan <sebastien.alaiwan@gmail.com>
* jit/jit-opcodes: include jit/jit-opcode-compat.h instead of
jit-opcode-compat.h.
* jit/Makefile.am: make path of generated dependencies relative to
top_builddir.
2016-11-10 Tomasz Borowik <timon37@gmail.com>
* include/jit/jit-meta.h: include jit-common.h instead of jit-defs.h
2016-10-22 Aleksey Demakov <ademakov@gmail.com>
* tools/gen-apply-helper.h, tools/gen-apply-helper.c: move register
detection functions to separate files to avoid inter-procedural
constant propagation in modern compilers (e.g. gcc-6.*).
2016-04-08 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-insn.c (jit_insn_label): revert the function to its old
behavior of unconditional new basic block creation. Certain code
relied upon it.
* include/jit/jit-insn.h, jit/jit-insn.c (jit_insn_label_tight): add
new function for the behavior of jit_insn_label() before reverted,
use it in most cases.
* include/jit/jit-plus.h
* jitplus/jit-plus-function.cpp (insn_label_tight): likewise.
* README, tests/README, jitruby/README: update.
2016-04-07 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-insn.c (jit_insn_call): the "intuit additional flags" code
was using wrong (caller instead of callee) function.
* bootstrap: renamed from auto_gen.sh
2016-03-09 Ketmar Dark <ketmar@ketmar.no-ip.org>
* jit/jit-insn.c (jit_insn_nop): add function.
* doc/mkhtml_onefile.sh: add file.
* doc/Makefile.am, doc/libjit.texi, jit/jit-objmodel.c: build docs
for `objmodel` extension.
2014-06-18 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-value.c (jit_value_get_param): add range check for param
argument (thanks Niklas Koep).
2014-03-11 Niklas Koep <niklas.koep@gmail.com>
* doc/Makefile.am, doc/libjit.texi: Include docs from jit-compile.c.
2014-01-21 John Perkins <jeperk70@gmail.com>
* doc/libjit.texi: Fix makeinfo problem with newer texinfo.
2014-01-20 Ben Noordhuis <info@bnoordhuis.nl>
* jit/jit-thread.c (_jit_thread_init): Fix Windows-only race
condition.
2013-10-17 Aleksey Demakov <ademakov@gmail.com>
* README, doc/libjit.texi: Update info on obtaining libjit sources.
2013-08-13 Chetan Reddy <chetanreddy@gmail.com>
* jit/jit-memory-cache.c (_jit_cache_start_function): If there is no
room left for a cache node on the current page then let restart with
a new page rather than giving up on it.
2013-03-04 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-memory-cache.c (_jit_cache_extend): the function now
returns a value (thanks Alexey Galakhov <agalakhov@gmail.com>).
* include/jit/jit-memory.h, jit/jit-internal.h, jit/jit-memory.c:
* jit/jit-memory-cache.c: add jit_function_info_t typedef and use it
in the memory manager interface for more clarity (the idea is taken
from Alexey Galakhov's proposal but done in a weaker form, without
type safety).
2013-02-27 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-dump.c (jit_dump_function): fix error finding function end
address (thanks Alexey Galakhov <agalakhov@gmail.com> for spotting).
* jit/Makefile.am, jit/jit-apply-alpha.h, jit/jit-apply-alpha.c
* jit/jit-gen-alpha.h, jit/jit-rules-alpha.h, jit/jit-rules-alpha.c
* jit/jit-rules-alpha.ins: Remove all alpha related files from the
distro. The files are still in the repo in the attic dir.
2013-02-26 Aleksey Demakov <ademakov@gmail.com>
* configure.ac, jit/jit-opcodes.ops, jit/jit-interp-opcode.ops
* Makefile.am, jit/Makefile.am, include/jit/Makefile.am: Move ops
files from the config to jit dir, remove the config dir.
* configure.ac: Use build-aux dir for autoconf files. Update the
mailing list address.
2012-11-06 Aleksey Demakov <ademakov@gmail.com>
* dpas/dpas-scope.c (dpas_scope_destroy): Fix a memory leak in dpas.
* include/jit/jit-memory.h, jit/jit-internal.h, jit/jit-memory.c
* jit-cache.c: restore ability to allocate memory for recompiled
functions.
2012-11-05 Aleksey Demakov <ademakov@gmail.com>
* jitplus/jit-plus-function.cpp (create): free function signature.
* tutorial/t3.c, tutorial/t3.c: free function signature.
2012-10-30 Aleksey Demakov <ademakov@gmail.com>
* tutorial/t1.c, tutorial/t2.c: free function signature.
* jit/jit-block.c (delete_block): fix memory leak.
* jit/jit-memory-cache.c: rename jit-cache.c
2012-10-20 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-memory.h, jit/jit-internal.h, jit/jit-memory.c
* jit-cache.c: get back to the scheme where function start and end
addresses are kept by the memory manager, not in jit_function_t.
2012-10-16 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-memory.h: add file that defines pluggable memory
manager interface.
* jit-internal.h, jit/jit-memory.c: add a number of _jit_memory_*
pluggable memory wrapper functions. Replace with these wrappers
all _jit_cache_* calls.
* jit/jit-cache.c (jit_default_memory_manager): add function that
gets memory mamnager plugin interface.
* jit/jit-cache.h: remove file.
* include/jit/jit-context.h:
* jit/jit-context.c (jit_context_set_memory_manager): add function.
2012-10-12 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-util.h, jit/jit-alloc.c (jit_malloc_exec)
(jit_free_exec, jit_flush_exec, jit_exec_page_size): remove functions
from public API.
* jit/jit-internal.h, jit/jit-alloc.c (_jit_malloc_exec)
(_jit_free_exec, _jit_flush_exec): make these functions internal.
* jit/jit-util.c: new file, move here all public util functions from
jit/jit-alloc.c, jit/jit-memory.c, jit/jit-string.c.
2012-10-08 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-cache.c, jit/jit-cache.c(_jit_cache_alloc_trampoline)
(_jit_cache_free_trampoline, _jit_cache_alloc_closure)
(_jit_cache_free_closure): add functions.
* jit/jit-function.c (jit_function_create, _jit_function_destroy):
use trampoline alloc/free functions.
* jit/jit-apply.c, include/jit/jit-init.h (jit_get_closure_size)
(jit_get_closure_alignment, jit_get_trampoline_size)
(jit_get_trampoline_alignment): add functions.
* jit/jit-apply.c (jit_closures_supported): for consistency rename
function to jit_supports_closures.
2012-10-07 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-function.c (jit_function_create, _jit_function_destroy):
* jit/jit-cache.h, jit/jit-cache.c (_jit_cache_alloc_function)
(_jit_cache_free_function): allocate and free jit_function structs
within cache.
2012-10-04 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-cache.h, jit/jit-cache.c (_jit_cache_start_function):
remove the restart_count argument.
* jit/jit-cache.h, jit/jit-cache.c (_jit_cache_extend): add
function to allocate more cache space.
* jit/jit-cache.c (_jit_cache_alloc_data): let be called outside
function generation context.
2012-07-29 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-cache.h, jit/jit-cache.c (_jit_cache_start_function)
(_jit_cache_end_function, _jit_cache_get_code_break)
(_jit_cache_set_code_break, _jit_cache_get_code_limit)
(_jit_cache_alloc_data): new API for function allocation.
* jit/jit-cache.h, jit/jit-cache.c (_jit_cache_is_full)
(_jit_cache_start_method, _jit_cache_end_method)
(_jit_cache_alloc, _jit_cache_check_space): remove.
* jit/jit-cache.h, jit/jit-rules.h: remove jit_cache_posn struct.
Store the cache position data in jit_gencode struct.
* jit/jit-rules.h, jit/jit-rules.c: (_jit_gen_check_space)
(_jit_gen_alloc): add.
* jit/jit-cache.h, jit/jit-cache.c (_jit_cache_get_function):
rename from _jit_cache_get_method.
2012-02-11 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-cache.h, jit/jit-cache.c (_jit_cache_end_method): add
result argument that indicates if the code genration will need
to be restarted.
* jit/jit-cache.h, jit/jit-cache.c (jit_cache_mark_full): remove
macro and replace it with direct jit_cache_posn access where
appropriate.
* jit/jit-cache.h, jit/jit-cache.c (jit_cache_get_posn): likewise.
* jit/jit-cache.h, jit/jit-rules-interp.c (jit_cache_native): move
macro to where it only used.
* jit/jit-cache.h, jit/jit-cache.c: remove other unused stuff.
2012-01-22 Klaus Treichel <ktreichel@web.de>
* config/jit-opcodes.ops: Move declaration of obsolete opcodes to
the separate include file jit-opcode-compat.h and include this new
file instead.
* include/jit/jit-opcode-compat.h: add new include file for
obsolete opcodes.
* include/jit/Makefile.am: add jit-opcode-compat.h to the include
sources.
2012-01-21 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules.h (struct jit_gencode): add offset_encoder field
to encode bytecode offsets with jit_varints.
* jit/jit-internal.h (struct _jit_function): move fields cookie,
start, end here from jit_cache_method; add bytecode_offset field
to encode bytecode offsets with jit_varints.
* jit/jit-compile.c (mark_offset, _jit_function_get_bytecode): add
functions that use jit_varints for bytecode offset compression.
* jit/jit-cache.h, jit/jit-cache.c (_jit_cache_get_method):
remove cookie argument.
* jit/jit-cache.h, jit/jit-cache.c (_jit_cache_mark_bytecode)
(_jit_cache_set_cookie, _jit_cache_get_start_method)
(_jit_cache_get_end_method, _jit_cache_get_native)
(_jit_cache_get_bytecode, _jit_cache_get_size): remove functions,
get rid of bytecode offset compression and method region machinary.
* jit/jit-dump.c, jit/jit-function.c, jit/jit-rules-interp.c
* jit/jit-except.c, jit/jit-unwind.c: adjust where appropriate for
cache API change.
2011-12-18 Aleksey Demakov <ademakov@gmail.com>
* jit/Makefile.am:
* jit/jit-varint.h, jit/jit-varint.c: add new files for varaible
length int encoding with algorithm similar but not identical to one
currently used in jit-cache.c. The new algorithm in certain cases
better compresses unsigned ints.
2011-09-30 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-cache.h, jit/jit-cache.c (_jit_cache_new_region):
function removed.
2011-09-03 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-cache.h, jit/jit-cache.c (_jit_cache_get_method_list):
function removed.
2011-07-27 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-config.h: added new file as central location for all
platform config macros deduced from ./configure and cpp.
* jit/Makefile.am: add jit-config.h.
* include/jit/jit-context.h, jit/jit-context.c
(jit_context_supports_threads): removed.
* include/jit/jit-init.h, jit/jit-init.c (jit_supports_threads):
added function to replace jit_context_supports_threads.
* include/jit/jit-init.h, jit/jit-init.c
(jit_supports_virtual_memory): added new function to check if
the jit supports virtual memory routines.
* include/jit/jit-vmem.h, jit/jit-vmem.c (jit_vmem_init)
(jit_vmem_page_size, jit_vmem_round_up, jit_vmem_round_down)
(jit_vmem_reserve, jit_vmem_reserve_committed, jit_vmem_release)
(jit_vmem_commit, jit_vmem_decommit, jit_vmem_protect): added new
files with virtual memory routines.
* include/jit/Makefile.am, include/jit/jit.h: add jit-vmem.h
* jit/Makefile.am: add jit-vmem.c
* jit/jit-init.c (jit_init): call jit_vmem_init().
2011-07-10 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (choose_output_register, _jit_regs_assign):
fix handling of explicitely assigned registers.
* jit/jit-rules-x86.c (shift_reg): remove function.
* jit/jit-rules-x86.ins (JIT_OP_ISHL, JIT_OP_ISHR, JIT_OP_ISHR_UN):
rewrite rules with explicit assignment to "ecx" register, don't use
shift_reg() function.
2011-07-02 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-compile.c (compile_block): amend debug info
2010-11-28 Klaus Treichel <ktreichel@web.de>
* config/jit-opcodes.ops: Set the destination value type for the
address_of_label opcode.
* jit/jit-dump.c (jit_dump_insn): Print the destination value for
the address_of_label opcode.
2010-11-07 Klaus Treichel <ktreichel@web.de>
* jit/jit-cache.h: Fix comment for _jit_cache_get_end_method.
2010-10-24 Klaus Treichel <ktreichel@web.de>
* jit/jit-reg-alloc.c (_jit_regs_alloc_global): Set in_global_register
on global register assignment.
2010-10-04 Klaus Treichel <ktreichel@web.de>
* jit/jit-internal.h: Add missing typedef in the declaration of the
_jit_intrinsic_signature enumaeration. (Really Noah Lavine)
2010-09-21 Klaus Treichel <ktreichel@web.de>
* config/jit-opcodes.ops: Add definitions for the opcode's
intrinsics.
* jit/Makefile.am: Add jit-opcode-apply.c to the sources.
* jit/jit-internal.h (enum _jit_intrinsic_signature): Declare the
various intrinsic signatures.
(struct _jit_intrinsic_info): Declare structure to hold the intrinsic
information for an opcode.
* jit/jit-opcode-apply.c: Add support for constant folding.
* tools/gen-ops-parset.y, tools/gen-ops-scanner.l: Add support for
generating the opcode intrinsic table.
2010-09-12 Klaus Treichel <ktreichel@web.de>
* config/jit-opcodes.ops: Remove the *eq_inv and *ne_inv float
compare a branch opcodes because they behave exactly the same as
the corresponding opcodes without the _INV suffix.
Add macros to map the removed opcodes to their counterparts without
the _INV suffix.
* jit/jit-insn.c (jit_insn_to_not_bool): Replace the mappings
to *EQ_INV and *NE_INV by mappings to *EQ and *NE.
Remove the mappings for *EQ_INV and *NE_INV.
(jit_insn_branch_if): likwise
(jit_insn_branch_if_not): likewise
* jit/jit-interp.c (_jit_run_function): Remove handling of
the *EQ_INV and *NE_INV opcodes.
* jt/jit-rules-interp.c (_jit_gen_insn): Remove the *EQ_INV
and *NE_INV cases.
* jit/jit-rules-x86-64.ins.c: Remove handling of the *EQ_INV and *NE_INV
opcodes.
2010-08-10 Klaus Treichel <ktreichel@web.de>
* config/jit-opcodes.ops: Fix arg1 for the address_of opcode.
2010-08-09 Klaus Treichel <ktreichel@web.de>
* jit/jit-gen-x86-64.h: Add macros for the cvttss2si and cvttsd2si
instructions.
* jit-rules-x86-64.ins (JIT_OP_FLOAT32_TO_INT,
JIT_OP_FLOAT32_TO_UINT, JIT_OP_FLOAT32_TO_LONG,
JIT_OP_INT_TO_FLOAT32, JIT_OP_UINT_TO_FLOAT32,
JIT_OP_LONG_TO_FLOAT32, JIT_OP_FLOAT64_TO_FLOAT32,
JIT_OP_FLOAT64_TO_INT, JIT_OP_FLOAT64_TO_UINT,
JIT_OP_FLOAT64_TO_LONG, JIT_OP_INT_TO_FLOAT64,
JIT_OP_UINT_TO_FLOAT64, JIT_OP_LONG_TO_FLOAT64,
JIT_OP_FLOAT32_TO_FLOAT64: Add support for these new opcodes.
2010-08-08 Klaus Treichel <ktreichel@web.de>
* jit/jit-rules-x86.ins (JIT_OP_FLOAT32_TO_INT,
JIT_OP_FLOAT64_TO_INT, JIT_OP_FLOAT32_TO_LONG,
JIT_OP_FLOAT64_TO_LONG, JIT_OP_INT_TO_FLOAT32,
JIT_OP_INT_TO_FLOAT64, JIT_OP_UINT_TO_FLOAT32,
JIT_OP_UINT_TO_FLOAT64, JIT_OP_LONG_TO_FLOAT32,
JIT_OP_LONG_TO_FLOAT64, JIT_OP_ULONG_TO_FLOAT32,
JIT_OP_ULONG_TO_FLOAT64, JIT_OP_FLOAT64_TO_FLOAT32,
JIT_OP_FLOAT32_TO_FLOAT64: Add support for these new opcodes.
* tests/math.pas: Add tests for integer/float conversions.
2010-08-07 Klaus Treichel <ktreichel@web.de>
* config/jit-opcodes.ops: Add opcodes for direct conversions from
and to 32-bit and 64-bit floatingpoint values.
* jit/jit-interp.c (_jit_run_function): Add support for the new
opcodes.
* jit/jit-insn.c: Add the new opcodes to the convert_intrinsics
table.
(jit_insn_convert): Use the new opcodes for conversions from and to
32-bit and 64-bit floatingpoint values.
2010-08-06 Klaus Treichel <ktreichel@web.de>
* configure.ac: Add checks for the rint, round and trunc c library
functions.
* config/jit-opcodes.ops: (ftrunc, dtrunc, nftrunc): Add opcode
definitions for the new trunc instruction.
* dpas/dpas-builtin.c: Add new Trunc builtin.
* include/jit/jit-insn.c (jit_insn_trunc): Add prototype.
* include/jit/jit-intrinsic.h (jit_float32_trunc, jit_float64_trunc,
jit_nfloat_trunc): Add prototypes.
* jit/jit-insn.c (jit_insn_trunc): Add new float rounding function.
Refine comments for the rounding functions.
* jit/jit-interp.c (_jit_run_function): Add support for the new
trunc opcodes.
* jit/jit-intrinsic.c: Nove float rounding intrinsics to one block
and refine conmments.
(jit_float32_rint): Use rintf or rint if available.
(jit_float64_rint): Use rint if available.
(jit_nfloat_rint): Use rintl if available.
(jit_float32_round): Use roundf or round if available.
(jit_float64_round): Use round if available.
(jit_nfloat_round): Use roundl if available.
(jit_float32_trunc, jit_float64_trunc, jit_nfloat_trunc): Add new
rounding intrinsics for rounding float values towards zero.
* jit/jit-symbol.c: Add the new intrinsics jit_float32_trunc,
jit_float64_trunc and jit_nfloat_trunc to the symbol table.
* tests/math.pas: Add tests for the new trunc insn.
* include/jit/jit-plus.h: Add jit_function insn_trunc member.
* jitplus/jit-plus-function.cpp (insn_trunc): Implement wrapper for
the new trunc insn.
2010-08-04 Klaus Treichel <ktreichel@web.de>
* include/jit/Makefile.am: Don't include jit-arch.h in the
distribution.
* tools/gen-apply.c: Include a local copy of jit-arch.h instead of
the one in the include dir because that one is not yet present in
the build process.
* tools/Makefile.am: Create a local symbolic link jit-arch.h to
the arch specific header in the include dir.
2010-08-03 Klaus Treichel <ktreichel@web.de>
* Makefile.am: Add config to the subdirectories.
* configure.ac: Add config/Makefile the the makefiles to generate.
* include/jit/Makefile.am: Add jit-opcode.h to BUILT_SOURCES and
DISTCLEANFILES. Add the rule to generate jit-opcodes.h.
* include/jit/jit-opcode.h: Delete because it will be generated.
* jit/Makefile.am: Add jit-opcode.c, jit-interp-opcode.c and
jit-interp-opcode.h to BUILT_SOURCES.
Add jit-interp-opcode.c and jit-interp-opcode.h to libjit_la_SOURCES.
Add rules to generate jit-opcode.c, jit-interp-opcode.c and
jit-interp-opcode.h.
Adjust rule to generate jit-interp-labels.h.
* jit/jit-dump.c: Remove the extern declaration of the interpreter
opcode table.
* jit/jit-interp.h: Replace the opcode declaration by including
the generated file.
* jit/jit-opcode.c: Delete because its generated now.
* jit/jit-interp.c: Adjust names of interpreter specific opcodes.
* jit/jit-rules-interp.c: Likewise.
* jit/mklabel.sh: Adjust for opcode name change of interpreter
specific opcodes.
* tools/.gitignore: Add new built files.
* tools/Makefile.am: Add rules to build gen-ops.
* tools/gen-ops-parser.y, tools/gen-ops-scanner.l: Add opcode table
generator.
* config/Makefile.am: Added
* config/jit-opcodes.ops: Add definition source of the bastic
libjit opcodes.
* config/jit-interp-opcodes.ops: Add definition source of the
interpreter specific libjit opcodes.
* include/jit/.gitignore, jit/.gitignore: Add new built files to
the ignore list.
2010-05-31 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-block.c: allow empty block branch optimization for blocks
used both in branch insns and in address-of insns. Branch labels are
split from address-of labels and become eligible for optimization
while the address-of labels stay with the original block.
2010-05-22 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-apply-x86-64.h (JIT_MEMCPY): fix build for MacOS X.
2010-05-15 Klaus Treichel <ktreichel@web.de>
* jit/jit-instrinsic.c ((jit_float32_to_int, jit_float32_to_uint,
jit_float32_to_long, jit_float32_to_ulong, jit_float32_to_int_ovf,
jit_float32_to_uint_ovf, jit_float32_to_long_ovf,
jit_float32_to_ulong_ovf, jit_float64_to_int, jit_float64_to_uint,
jit_float64_to_long, jit_float64_to_ulong, jit_float64_to_int_ovf,
jit_float64_to_uint_ovf, jit_float64_to_long_ovf,
jit_float64_to_ulong_ovf, jit_int_to_float32, jit_int_to_float64,
jit_uint_to_float32, jit_uint_to_float64, jit_long_to_float32,
jit_long_to_float64, jit_ulong_to_float32, jit_ulong_to_float64,
jit_float32_to_float64, jit_float64_to_float32): Add intrinsics for
direct conversion from float32 and float64 to the various integer
types and float32 to float64 and vice versa.
* include/jit/jit-intrinsic.h: Add the prototypes for the new
intrinsics.
* jit/jit-symbol.c: Add the new intrinsics to the symbol table.
* jit/jit-value.c (jit_constant_convert): Use the new intrinsics in
constant conversions.
* jit/jit-block.c (jit_block_get_next_label): Fix comment for texinfo.
* tools/gen-apply.c: Fix strict-alias-rules in returning struct tests.
2010-05-08 Klaus Treichel <ktreichel@web.de>
* jit/jit-block.c (_jit_block_clean_cfg): Don't merge an empty block
if the block's address was used.
2010-01-24 Klaus Treichel <ktreichel@web.de>
* jit/jit-insn.c (jit_insn_branch_if, jit_insn_branch_if_not): Fix
accesses to possibly freed memory.
2009-12-09 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-block.c (_jit_block_record_label): bail out on previously
assigned label.
* jit/jit-block.c (merge_empty): fix label merging.
* jit/jit-internal.h, jit/jit-insn.c (jit_insn_address_of_label)
* jit/jit-block.c (_jit_block_record_label_flags): flag labels that
are taken address of.
* jit/jit-block.c (eliminate_unreachable, _jit_block_clean_cfg):
do not optimize away blocks with labels flagged as being taken
address of.
2009-11-01 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-block.c (_jit_block_clean_cfg): implement the "combine" part
of cleanup algorithm.
2009-10-31 Klaus Treichel <ktreichel@web.de>
* jit/jit-compile.c (_JIT_RESULT_TO_OBJECT, _JIT_RESULT_FROM_OBJECT):
Fix compiler warnings on systems where sizeof(int) != sizeof(void *)
* jit/jit-rules-x86-64.c (fixup_alloca): Added to handle alloca
fixups with param area enabled.
(_jit_gen_epilog): Generate the epilog differenty if the stackpointer
was changed during code generation with param area enabled.
* jit/jit-rules-x86-64.h: Add the alloca_fixups to the
extra_gen_state.
* jit/jit-rules-x86-64.ins: Add support for JIT_OP_ALLOCA.
(alloca support based on a patch from Peter Lobsinger, thanks)
2009-10-30 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-function.h, jit/jit-function.c
(jit_function_labels_equal): add function that checks if two labels
belong to the same basic block.
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c
(_jit_regs_clear_all_outgoing): add function.
* jit/jit-compile.c (compile_block): use _jit_regs_clear_all_outgoing
after each function call.
* include/jit/jit-except.h (JIT_RESULT_CACHE_FULL): add result code.
* jit/jit-cache.h, jit/jit-cache.c (_jit_cache_check_space): add
function to check the available cache space.
* jit/jit-compile.c: use internal exception to handle the cache full
condition.
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c, jit/jit-rules-alpha.c,
* jit/jit-rules-arm.c, jit/jit-rules-interp.c, jit/jit-rules-x86.c,
* jit/jit-rules-x86-64.c, tools/gen-rules-parser.y: use internal
exceptions to signal the cache full condition and other codegen
errors.
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c (_jit_regs_inst_ptr)
(_jit_regs_end): remove functions.
2009-10-13 Gopal V <gopalv@php.net>
* jit/jit-insn.c (jit_insn_branch_if_not,jit_insn_branch_if): Redo
last patch to use the branch instructions, but without removing the
actual compare step (Aleksey's suggestion).
2009-10-09 Gopal V <gopalv@php.net>
* jit/jit-insn.c (jit_insn_branch_if_not,jit_insn_branch_if): Remove
the premature optimization of compare & branch operations (thanks
Klaus).
2009-08-04 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-block.c (_jit_block_clean_cfg): avoid jump tables
while cleaning branches (thanks Fredrik Ehnbom).
2009-06-10 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86.ins (JIT_OP_BR_LFALSE): add opcode rule.
2009-06-10 Michele Tartara <mikyt@users.sourceforge.net>
* jit/jit-rules-x86.ins (JIT_OP_BR_LTRUE): add opcode rule.
2009-06-05 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-compile.c (jit_function_compile)
(jit_function_compile_entry, jit_function_setup_entry)
(_jit_function_compile_on_demand): new file, move all compile
functions here from jit-function.c.
* jit/jit-compile.c (jit_compile, jit_compile_entry): add new
functions that do exactly the same as jit_function_compile and
jit_function_compile_entry but return JIT_RESULT_ error code.
* jit/jit-compile.c (jit_optimize): add function to optimize IR.
* include/jit/jit-function.h: add optimization level constants
JIT_OPTLEVEL_NONE and JIT_OPTLEVEL_NORMAL.
* jit/jit-function.c (jit_function_create) set JIT_OPTLEVEL_NORMAL
optimization level by default.
* jit/jit-function.c (jit_function_get_max_optimization_level):
return JIT_OPTLEVEL_NORMAL.
* jit/jit-internal.h (struct _jit_function): add is_optimized field
to _jit_function struct.
* jit/jit-compile.c (compile): catch internal exceptions.
* jit/jit-block.c: use internal exceptions instead of return codes
for CFG error handling.
2009-05-10 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-except.h (JIT_RESULT_UNDEFINED_LABEL):
* jit/jit-except.c (jit_exception_builtin): add new builtin
exception.
* jit/jit-internal.h (struct _jit_label_info): add srtuct.
(struct _jit_builder): replace label_blocks with label_info.
* jit/jit-block.c (_jit_block_record_label):
* jit/jit-dump.c (jit_dump_function):
* jit/jit-insn.c (jit_insn_label): allow more than one label per
basic block.
* include/jit/jit-block.h:
* jit/jit-block.c (jit_block_get_next_label): add function.
2009-05-09 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-internal.h, jit/jit-block.c, jit/jit-insn.c,
* jit/jit-function.c: allocate insns as individual array for each
basic block instead of using common per-function pool.
* jit/jit-internal.h, jit/jit-block.c: keep useless basic blocks
in the deleted_blocks list instead of freeing them immediately as
these blocks still may be referenced from elsewhere, for instance,
from jit_value_t structs.
* jit/jit-internal.h, jit/jit-block.c (_jit_block_is_final): add
function to check if the given block is the last one.
* jit/jit-rules-alpha.c, jit/jit-rules-arm.c, jit/jit-rules-x86.c,
* jit/jit-rules-x86-64.c (jump_to_epilog): use _jit_block_is_final.
2009-04-29 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-block.c (_jit_block_build_cfg, _jit_block_clean_cfg): add
functions to build and clean control flow graph.
* jit/jit-block.c, jit-live.c (_jit_block_peephole_branch): remove
function superseded by jit_block_clean_cfg().
* jit/jit-internal.h, jit/jit-block.c:
* jit/jit-function.c, jit/jit-insn.c: add control flow graph edges
to basic blocks, streamline basic block handling.
* jit/jit-block.c (jit_block_get_label): return jit_label_undefined
instead of zero on error.
* jit/jit-insn.c (jit_insn_call_finally): create a new block after
JIT_OP_CALL_FINALLY.
* jit/Makefile.am (libjit_la_SOURCES): remove jit-cfg.[ch].
2009-04-24 Michele Tartara <mikyt@users.sourceforge.net>
* jit/jit-gen-arm.h (arm_mov_reg_float): fix typo.
* jit/jit-rules-arm.c (_jit_gen_load_value): fix load logic.
2009-04-22 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-insn.c (jit_insn_call, jit_insn_call_indirect)
(jit_insn_call_indirect_vtable, jit_insn_call_native): don't end
basic block before a function call, rather end it after the call if
the call may throw some exception.
* jit/jit-function.c (compile_block): spill all registers before
calls.