-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangeLog
3271 lines (2263 loc) · 121 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
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.
2009-04-21 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-dump.c (jit_dump_insn): fix "call_finally" dump.
2009-04-16 Michele Tartara <mikyt@users.sourceforge.net>
* jit/jit-rules-arm.c: ARM backend fixes.
2009-04-16 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (set_regdesc_flags): fix bug reported by
jan@wedesoft.de.
2009-04-05 Michele Tartara <mikyt@users.sourceforge.net>
* jit/jit-type.c (perform_layout): let struct alignment be greater
than alignment of every indvidual field.
2009-03-28 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules.h (jit_reg_name, jit_reg_flags, jit_reg_code); add
convenience macros for register info access.
* jit/jit-rules.h, jit/jit-rules-interp.c, jit/jit-rules-x86.c,
* jit/jit-rules-arm.c (_jit_reg_get_pair, jit_reg_get_pair): add
function and macro for finding register pair.
* jit/jit-reg-alloc.c: replace use of _jit_regs_needs_long_pair with
jit_reg_get_pair().
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c (_jit_regs_get_cpu)
(_jit_regs_needs_long_pair): remove unused functions.
2009-03-25 Michele Tartara <mikyt@users.sourceforge.net>
* jit/jit-gen-arm.h (arm_alu_cc_reg): fix a typo.
* jit/jit-rules-arm.ins (JIT_OP_IDIV): support negative dividends.
2009-03-24 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules.h (jit_reg_other_reg): add macro.
* jit/jit-reg-alloc.c: replace OTHER_REG with jit_reg_other_reg.
* jit/jit-rules-x86.c (_jit_gen_load_value): use jit_reg_other_reg.
* jit/jit-rules-arm.c (_jit_gen_load_value)
(_jit_gen_load_value_struct): use jit_reg_other_reg.
2009-03-23 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-arm.ins: minor cleanup.
2009-03-23 Michele Tartara <mikyt@users.sourceforge.net>
* jit/jit-gen-arm.h: add more ARM codegen macros including VFP
support.
* jit/jit-rules-arm.ins: restore ARM FPA rules, implement IDIV and
fix MEMSET opcodes.
* jit/jit-rules-arm.h, jit/jit-rules-arm.c: more ARM code.
* jit/jit-reg-alloc.c (_jit_regs_commit): fix typo.
2009-02-07 Aleksey Demakov <ademakov@gmail.com>
* gen-sel-parser.y, gen-sel-scanner.l: remove obsolete files.
* tools/Makefile.am: remove gen-sel target.
* jit/jit-apply-arm.h (jit_builtin_apply): fix bug and optimize.
2009-02-06 Klaus Treichel <ktreichel@web.de>
* jit/jit-apply-x86.h: Add @PLT to the definition of JIT_MEMCPY to
prevent set TEXTREL flags in the shared library.
2009-02-06 Michele Tartara <mikyt@users.sourceforge.net>
* jit/jit-rules.h: define JIT_BACKEND_ARM on ARM.
* tools/gen-apply.c: define PLATFORM_IS_ARM on ARM.
* include/jit/jit-arch-arm.h: add ARM arch header.
* jit/Makefile.am, jit/jit-rules-arm.ins, jit/jit-rules-arm.sel:
replace obsolete .sel file for ARM with .ins file.
* jit/jit-apply-arm.h: define jit_indirector_size, jit_should_pad,
override jit_builtin_apply.
* jit/jit-apply-arm.c (_jit_create_indirector, _jit_pad_buffer): add
functions.
* jit/jit-apply-func.h: for each jit_builtin_* macro add individual
check if it's already defined.
2009-01-30 Peter Fristedt <fristedt@gmail.com>
Kirill Kononenko <Kirill.Kononenko@gmail.com>
* tools/gen-apply.c (run_detect_struct_##n): Work around a bug in
gcc-4.3 with optimization level 2 and Debian Lenny. Make
'jit_nint stack[1]' volatile.
2009-01-01 Klaus Treichel <ktreichel@web.de>
* jit/jit-rules-x86-64.ins (JIT_OP_NFLOAT_TO_FLOAT32,
JIT_OP_NFLOAT_TO_FLOAT64): Add rules for the case that the
destination value is in the stack frame.
(JIT_OP_BR_ILT, JIT_OP_BR_ILE, JIT_OP_BR_IGT, JIT_OP_BR_IGE):
Handle the comparision with a constant 0 with a test opcode instead
of a cmp.
(JIT_OP_ISIGN, JIT_OP_LSIGN): Add handling of the integer sign
opcodes.
2008-12-21 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-dump.c (jit_dump_function): dump undefined labels as such
rather than generating new labels for them.
2008-12-12 Aleksey Demakov <ademakov@gmail.com>
* jitruby/*: add Paul Brannan's ruby-libjit.
2008-12-11 Juan Jesus Garcia de Soria <juanj.g_soria@grupobbva.com>
* jit/jit-insn.c (jit_insn_call_native): extend small int return
values to full ints as native calls sometimes return garbage in MSB
of the return register.
2008-12-11 Aleksey Demakov <ademakov@gmail.com>
* configure.ac: bump version to 0.1.3
2008-12-10 Klaus Treichel <ktreichel@web.de>
* jit/jit-rules-x86-64.c (x86_64_call_code): Load %rax with 8 before
doing the call for calls to variadic functions.
* jit/jit-rules-x86-64.ins (JIT_OP_CALL_INDIRECT,
JIT_OP_CALL_VTABLE_PTR): likewise.
2008-12-10 Aleksey Demakov <ademakov@gmail.com>
* configure.ac: bump version to 0.1.2
* NEWS: update news for the 0.1.2 release
2008-11-23 Arto Bendiken <arto.bendiken@gmail.com>
* jit/jit-apply-x86.h, tools/gen-apply.c, tools/gen-apply-macosx.h:
Mac OS X compatibility fixes.
2008-11-04 Klaus Treichel <ktreichel@web.de>
* jit/jit-apply-x86-64.h (jit_builtin_apply): Use r11 for calling
the function and pass the constant 8 in rax for the number of SSE
registers used to pass values for variadic functions.
* jit/jit-rules-x86-64.c (_spill_reg): Spill values with sizes
less than 4 as jit_type_int on the stack.
2008-10-12 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-unwind.c: fix typos.
* jit/jit-interp.c (_jit_run_function): adjust exception_pc if
exception is generated by a previous instruction.
2008-10-05 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-interp.c (_jit_run_function): fix implementation of the
JIT_OP_TRUNC_INT and JIT_OP_TRUNC_UINT opcodes in interpreter.
* jit/jit-rules-interp.c (_jit_gen_insn): add support of the
JIT_OP_INCOMING_REG opcode, interpreter needs it for exception
handling.
2008-08-07 Klaus Treichel <ktreichel@web.de>
* jit/jit-apply.c jit/jit-insn.c, jit/jit-interp.c,
tools/gen-apply.c: Include stdlib.h if available to pick up the
declaration of alloca on NetBSD.
2008-07-26 Klaus Treichel <ktreichel@web.de>
* jit/jit-rules-x86-64.c (xmm_cmp_reg_imm, xmm_cmp_setcc_reg_imm,
xmm_cmp_brcc_reg_imm): Add functions to handle compares with an
immediate value.
* jit/jit-rules-x86-64.ins: Add rules for an immediate value for
JIT_OP_FEQ, ..., JIT_OP_DEQ, ... and the float32 and float64
conditional branch opcodes.
2008-07-19 Klaus Treichel <ktreichel@web.de>
* dpas/dpas-parser.y (handle_boolean_binary): Add macro for binary
operators returning a boolean value.
(handle_compare_binary): Use handle_boolean_binary instead of
handle_binary for non pointer compares. Set the result type to
dpas_type_boolean instead of the common type for pointer compares.
* tests/cond.pas: Add float compare tests where nan values are
involved. Add compare tests for the *_inv opcodes.
Add the same tests using branches for all float compare opcodes.
* jit/jit-rules-x86-64.c (xmm_setcc, xmm_cmp_setcc_reg_reg,
xmm_brcc, xmm_cmp_brcc_reg_reg, xmm_cmp_brcc_reg_membase): Add
functions to handle float compares with consideration of nan values.
* jit/jit-rules-x66-64.ins: Rewrite the float32 and float64 compare
and branch rules using the new functions in jit-rules-x86-64.c.
Add the corresponding *_inv rules.
2008-07-06 Klaus Treichel <ktreichel@web.de>
* jit/jit-rules-x86-64.ins: Replace the check if an immediate value
is a signed 32bit value by using an if clause the new imms32 clause.
Flag rules for branch opcodes with the branch option and add the
commutative option where appropriate.
2008-07-06 Juan Jesus Garcia de Soria <juanj.g_soria@grupobbva.com>
* jit/jit-reg-alloc.c (choose_input_order): take into account global
registers to see if it is suitable to exchange input values. This
fixes a problem that took place when a commutative op is applied to
a value that resides in a global register and is both the dest and
the second source value of the op.
2008-05-30 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-common.h: remove unused jit_function_compiled_t
type.
* include/jit/jit-except.h, include/jit/jit-common.h: move
JIT_NO_OFFSET from jit-except.h to jit-common.h.
* include/jit/jit-unwind.h, jit/jit-unwind.c: new files.
* include/jit/jit.h, include/jit/Makefile.am: add jit-unwind.h.
* jit/Makefile.am: add jit-unwind.c.
* jit/jit-except.c (jit_exception_get_stack_trace): re-implement
using unwind routines.
2008-05-28 Juan Jesus Garcia de Soria <juanj.g_soria@grupobbva.com>
* jit/jit-alloc.c (jit_free_exec): fix VirtualFree arguments.
* jit/jit-function.c (_jit_function_destroy): free signature on the
function destruction.
2008-05-27 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-internal.h (jit_builder_t):
* jit/jit-insn.c (initialize_setjmp_block): remove longjmp_label
field as useless.
2008-05-26 Klaus Treichel <ktreichel@web.de>
* tools/gen-rules-parser.y, tools/gen-rules-scanner.l: Add the imms32
and immu32 keywords for 32bit signed and unsigned immediate values.
* tools/gen-apply.c: Add support for apply return structs where
different float types are at different offsets in the return struct.
* jit/jit-apply.c (closure_handler): Handle return of different float
types with different macros.
* jit/jit-apply-x86.h (jit_builtin_return_float): Adjust macro to
the new apply return struct layout.
Add the new jit_builtin_return_double and jit_builtin_return_nfloat
macros.
Fix jit_builtin_return_float macro for MS cl.
* jit/jit-apply-x86-64.h (jit_builtin_return_float): Adjust macro
to the new apply return struct layout.
Add the new jit_builtin_return_double and jit_builtin_return_nfloat
macros.
* jit/jit-apply-func.h: Add the new jit_builtin_return_double,
jit_builtin_return_nfloat and jit_builtin_return_long macros.
2008-05-26 Juan Jesus Garcia de Soria <juanj.g_soria@grupobbva.com>
* include/jit/jit-defs.h.in: define JIT_EXPORT_DATA macro to support
win32 DLL symbol import/export idiosyncrasy. On non-win32 this macro
is simply "extern".
* include/jit/jit-type.h, include/jit/jit-opcode.h: replace "extern"
with JIT_EXPORT_DATA in data declaration.
2008-05-24 Klaus Treichel <ktreichel@web.de>
* jit/jit-rules-x86-64.c (_jit_gen_prolog, _jit_gen_epilog): Add
support for the param area.
(_jit_setup_call_stack): Define this function only if not using
the param area.
(_jit_create_call_setup_insns): Call _jit_fix_call_stack with
and without usage of the param area.
(_jit_create_call_return_insns): Declare the locals abi and
current_param only if built without support of the param area to
avoid compiler warnings.
* jit/jit-rules-x86-64.ins: Add the support of the
JIT_OP_SET_PARAM_* opcodes for param area support.
* jit/jit-rules-x86-64.h: Define JIT_USE_PARAM_AREA and do some
code cleanup and reformatting.
2008-05-23 Juan Jesus Garcia de Soria <juanj.g_soria@grupobbva.com>
* jit/jit-alloc.c (jit_malloc_exec, jit_free_exec): on win32 use
VirtualAlloc and VirtualFree to allocate/free executable memory.
2008-05-23 Klaus Treichel <ktreichel@web.de>
* dpas/dpas-scanner.l, tools/gen-rules-scanner.l,
tools/gen-sel-scanner.l: Define YY_NO_UNISTD_H if unistd.h is not
available to prevent flex from including unistd.h.
* include/jit/jit-arch-x86.h, include/jit/jit-arch-x86.h: Fix the
definition of _JIT_ARCH_GET_CURRENT_FRAME for MS cl. Use a
temporary value for ebp/rbp because cl doesn't like arguments like
f->x in the __asm statements.
* jit/jit-rules-x86.ins: Move declaration of patch to the start of
the block in JIT_OP_ULONG_TO_NFLOAT to be ANSI C compliant.
2008-05-21 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-walk.h (jit_get_next_frame_address): use
JIT_ARCH_GET_NEXT_FRAME if defined, use gcc syntax only if
defined __GNUC__.
2008-05-12 Klaus Treichel <ktreichel@web.de>
* jit/jit-apply-x86-64.h: Include jit/jit-common.h instead of
jit-internal.h to get the definition of the libjit types.
2008-05-08 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86.ins:
* jit/jit-rules-x86-64.ins:
* jit/jit-function.c (compile_block): let register allocator see
JIT_OP_INCOMING_REG and JIT_OP_RETURN_REG instructions so it can
free unused values on these instructions rather than on the block
end.
* jit/jit-reg-alloc.c (_jit_regs_set_incoming): it is not possible
to correctly spill the old register value at this point so do not
attempt this and do not promise this.
2008-05-04 Klaus Treichel <ktreichel@web.de>
* jit/jit-reg-alloc.c (_jit_regs_set_outgoing): Set the outgoing
register inhibited regardless if the value was already in the
register or not.
* jit/jit-insn.c (jit_insn_check_null): Emit the check only if the
value to check is no nint constant != 0.
2008-04-22 Aleksey Demakov <ademakov@gmail.com>