This repository has been archived by the owner on Mar 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathecl-ios-patches.txt
1268 lines (1181 loc) · 40.1 KB
/
ecl-ios-patches.txt
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
diff -rc ../ecl-11.1.1/src/c/symbols_list.h ./src/c/symbols_list.h
*** ../ecl-11.1.1/src/c/symbols_list.h Sun Jan 16 13:39:57 2011
--- ./src/c/symbols_list.h Thu Jan 5 07:06:11 2012
***************
*** 1154,1159 ****
--- 1154,1161 ----
{SYS_ "POINTER", SI_ORDINARY, si_pointer, 1, OBJNULL},
#ifndef ECL_CMU_FORMAT
{SYS_ "PRETTY-PRINT-FORMAT", SI_ORDINARY, NULL, -1, OBJNULL},
+ #else
+ {SYS_ "PRETTY-PRINT-FORMAT", NULL},
#endif
{SYS_ "PROCESS-DECLARATIONS", SI_ORDINARY, si_process_declarations, -1, OBJNULL},
{SYS_ "PROCESS-LAMBDA", SI_ORDINARY, si_process_lambda, 1, OBJNULL},
***************
*** 1177,1182 ****
--- 1179,1186 ----
{SYS_ "SET-SYMBOL-PLIST", SI_ORDINARY, si_set_symbol_plist, 2, OBJNULL},
#if defined(HAVE_PUTENV) || defined(HAVE_SETENV)
{EXT_ "SETENV", SI_ORDINARY, si_setenv, 2, OBJNULL},
+ #else
+ {EXT_ "SETENV", SI_ORDINARY, NULL, -1, OBJNULL},
#endif
{SYS_ "SETF-LAMBDA", SI_ORDINARY, NULL, -1, OBJNULL},
{SYS_ "SETF-METHOD", SI_ORDINARY, NULL, -1, OBJNULL},
***************
*** 1230,1235 ****
--- 1234,1241 ----
#ifdef PROFILE
{SYS_ "*PROFILE-ARRAY*", SI_SPECIAL, NULL, -1, OBJNULL},
+ #else
+ {SYS_ "*PROFILE-ARRAY*", SI_SPECIAL, NULL, -1, OBJNULL},
#endif
{EXT_ "*SOURCE-LOCATION*", EXT_SPECIAL, NULL, -1, Cnil},
***************
*** 1240,1245 ****
--- 1246,1255 ----
{SYS_ "PROFILE", SI_ORDINARY, si_profile, -1, OBJNULL},
{SYS_ "CLEAR-PROFILE", SI_ORDINARY, si_clear_profile, -1, OBJNULL},
{SYS_ "DISPLAY-PROFILE", SI_ORDINARY, si_display_profile, -1, OBJNULL},
+ #else
+ {SYS_ "PROFILE", SI_ORDINARY, NULL, -1, OBJNULL},
+ {SYS_ "CLEAR-PROFILE", SI_ORDINARY, NULL, -1, OBJNULL},
+ {SYS_ "DISPLAY-PROFILE", SI_ORDINARY, NULL, -1, OBJNULL},
#endif /* PROFILE */
#ifdef TCP
***************
*** 1464,1469 ****
--- 1474,1481 ----
{SYS_ "C-ULONG-LONG-MAX",SI_CONSTANT,NULL,-1,OBJNULL}, /* See main.d */
#ifdef ecl_long_long_t
{SYS_ "C-LONG-LONG-BIT", SI_CONSTANT, NULL, -1, MAKE_FIXNUM(ECL_LONG_LONG_BITS)},
+ #else
+ {SYS_ "C-LONG-LONG-BIT", NULL},
#endif
#ifdef GBC_BOEHM
{SYS_ "GC", SI_ORDINARY, si_gc, -1, OBJNULL},
***************
*** 1653,1658 ****
--- 1665,1672 ----
#ifdef ENABLE_DLOPEN
{SYS_ "LOAD-BINARY", SI_ORDINARY, si_load_binary, 4, OBJNULL},
+ #else
+ {SYS_ "LOAD-BINARY", SI_ORDINARY, NULL, -1, OBJNULL},
#endif
{SYS_ "*CODE-WALKER*", SI_SPECIAL, NULL, -1, OBJNULL},
***************
*** 1661,1666 ****
--- 1675,1684 ----
{SYS_ "CALL-CFUN", SI_ORDINARY, si_call_cfun, -1, OBJNULL},
{KEY_ "CALLBACK", KEYWORD, NULL, -1, OBJNULL},
{SYS_ "MAKE-DYNAMIC-CALLBACK", SI_ORDINARY, si_make_dynamic_callback, -1, OBJNULL},
+ #else
+ {SYS_ "CALL-CFUN", SI_ORDINARY, NULL, -1, OBJNULL},
+ {KEY_ "CALLBACK", KEYWORD, NULL, -1, OBJNULL},
+ {SYS_ "MAKE-DYNAMIC-CALLBACK", SI_ORDINARY, NULL, -1, OBJNULL},
#endif
{KEY_ "CDECL", KEYWORD, NULL, -1, OBJNULL},
{KEY_ "STDCALL", KEYWORD, NULL, -1, OBJNULL},
***************
*** 1687,1698 ****
--- 1705,1724 ----
{SYS_ "FIND-RELATIVE-PACKAGE", SI_ORDINARY, si_find_relative_package, -1, OBJNULL},
{SYS_ "PACKAGE-PARENT", SI_ORDINARY, NULL, -1, OBJNULL},
{SYS_ "PACKAGE-CHILDREN", SI_ORDINARY, NULL, -1, OBJNULL},
+ #else
+ {SYS_ "*RELATIVE-PACKAGE-NAMES*", SI_SPECIAL, NULL, -1, RELATIVE_PACKAGES_P},
+ {KEY_ "RELATIVE-PACKAGE-NAMES", KEYWORD, NULL, -1, OBJNULL},
+ {SYS_ "FIND-RELATIVE-PACKAGE", SI_ORDINARY, NULL, -1, OBJNULL},
+ {SYS_ "PACKAGE-PARENT", SI_ORDINARY, NULL, -1, OBJNULL},
+ {SYS_ "PACKAGE-CHILDREN", SI_ORDINARY, NULL, -1, OBJNULL},
#endif
{SYS_ "WRONG-TYPE-ARGUMENT", SI_ORDINARY, NULL, -1, OBJNULL},
#ifdef GBC_BOEHM
{SYS_ "GC-STATS", SI_ORDINARY, si_gc_stats, 1, OBJNULL},
+ #else
+ {SYS_ "GC-STATS", SI_ORDINARY, NULL, 1, OBJNULL},
#endif
{SYS_ "*CURRENT-FORM*", SI_SPECIAL, NULL, -1, OBJNULL},
diff -rc ../ecl-11.1.1/src/c/symbols_list2.h ./src/c/symbols_list2.h
*** ../ecl-11.1.1/src/c/symbols_list2.h Sun Jan 16 13:39:57 2011
--- ./src/c/symbols_list2.h Thu Jan 5 07:41:38 2012
***************
*** 1154,1159 ****
--- 1154,1161 ----
{SYS_ "POINTER","si_pointer"},
#ifndef ECL_CMU_FORMAT
{SYS_ "PRETTY-PRINT-FORMAT",NULL},
+ #else
+ {SYS_ "PRETTY-PRINT-FORMAT", NULL},
#endif
{SYS_ "PROCESS-DECLARATIONS","si_process_declarations"},
{SYS_ "PROCESS-LAMBDA","si_process_lambda"},
***************
*** 1177,1182 ****
--- 1179,1186 ----
{SYS_ "SET-SYMBOL-PLIST","si_set_symbol_plist"},
#if defined(HAVE_PUTENV) || defined(HAVE_SETENV)
{EXT_ "SETENV","si_setenv"},
+ #else
+ {EXT_ "SETENV",NULL},
#endif
{SYS_ "SETF-LAMBDA",NULL},
{SYS_ "SETF-METHOD",NULL},
***************
*** 1230,1235 ****
--- 1234,1241 ----
#ifdef PROFILE
{SYS_ "*PROFILE-ARRAY*",NULL},
+ #else
+ {SYS_ "*PROFILE-ARRAY*",NULL},
#endif
{EXT_ "*SOURCE-LOCATION*",NULL},
***************
*** 1240,1245 ****
--- 1246,1255 ----
{SYS_ "PROFILE","si_profile"},
{SYS_ "CLEAR-PROFILE","si_clear_profile"},
{SYS_ "DISPLAY-PROFILE","si_display_profile"},
+ #else
+ {SYS_ "PROFILE",NULL},
+ {SYS_ "CLEAR-PROFILE",NULL},
+ {SYS_ "DISPLAY-PROFILE",NULL},
#endif /* PROFILE */
#ifdef TCP
***************
*** 1464,1469 ****
--- 1474,1481 ----
{SYS_ "C-ULONG-LONG-MAX",NULL}, /* See main.d */
#ifdef ecl_long_long_t
{SYS_ "C-LONG-LONG-BIT",NULL},
+ #else
+ {SYS_ "C-LONG-LONG-BIT", NULL},
#endif
#ifdef GBC_BOEHM
{SYS_ "GC","si_gc"},
***************
*** 1653,1658 ****
--- 1665,1672 ----
#ifdef ENABLE_DLOPEN
{SYS_ "LOAD-BINARY","si_load_binary"},
+ #else
+ {SYS_ "LOAD-BINARY",NULL},
#endif
{SYS_ "*CODE-WALKER*",NULL},
***************
*** 1661,1666 ****
--- 1675,1684 ----
{SYS_ "CALL-CFUN","si_call_cfun"},
{KEY_ "CALLBACK",NULL},
{SYS_ "MAKE-DYNAMIC-CALLBACK","si_make_dynamic_callback"},
+ #else
+ {SYS_ "CALL-CFUN",NULL},
+ {KEY_ "CALLBACK",NULL},
+ {SYS_ "MAKE-DYNAMIC-CALLBACK",NULL},
#endif
{KEY_ "CDECL",NULL},
{KEY_ "STDCALL",NULL},
***************
*** 1687,1698 ****
--- 1705,1724 ----
{SYS_ "FIND-RELATIVE-PACKAGE","si_find_relative_package"},
{SYS_ "PACKAGE-PARENT",NULL},
{SYS_ "PACKAGE-CHILDREN",NULL},
+ #else
+ {SYS_ "*RELATIVE-PACKAGE-NAMES*",NULL},
+ {KEY_ "RELATIVE-PACKAGE-NAMES",NULL},
+ {SYS_ "FIND-RELATIVE-PACKAGE",NULL},
+ {SYS_ "PACKAGE-PARENT",NULL},
+ {SYS_ "PACKAGE-CHILDREN",NULL},
#endif
{SYS_ "WRONG-TYPE-ARGUMENT",NULL},
#ifdef GBC_BOEHM
{SYS_ "GC-STATS","si_gc_stats"},
+ #else
+ {SYS_ "GC-STATS",NULL},
#endif
{SYS_ "*CURRENT-FORM*",NULL},
diff -rc ../ecl-11.1.1/src/clos/defclass.lsp ./src/clos/defclass.lsp
*** ../ecl-11.1.1/src/clos/defclass.lsp Sun Jan 16 13:39:58 2011
--- ./src/clos/defclass.lsp Thu Jan 5 07:06:11 2012
***************
*** 118,124 ****
(setf (find-class name) new-class))
new-class))
! #+cross
(eval-when (compile)
(defun ensure-class (name &rest initargs)
(warn "Ignoring definition for class ~S" name)))
--- 118,124 ----
(setf (find-class name) new-class))
new-class))
! #+nil
(eval-when (compile)
(defun ensure-class (name &rest initargs)
(warn "Ignoring definition for class ~S" name)))
diff -rc ../ecl-11.1.1/src/cmp/cmpmain.lsp ./src/cmp/cmpmain.lsp
*** ../ecl-11.1.1/src/cmp/cmpmain.lsp Sun Jan 16 13:39:58 2011
--- ./src/cmp/cmpmain.lsp Thu Jan 5 07:06:11 2012
***************
*** 307,313 ****
(defun system-ld-flag (library)
"Given a symbol, try to find a library that matches it, either by looking in the
filesystem or in the database of ASDF modules."
! (let ((asdf (find-package "ASDF"))
system)
(labels ((asdfsym (x) (find-symbol (string x) asdf))
(asdfcall (fun &rest rest) (apply (asdfsym fun) rest))
--- 307,313 ----
(defun system-ld-flag (library)
"Given a symbol, try to find a library that matches it, either by looking in the
filesystem or in the database of ASDF modules."
! (let ((asdf #+asdf (find-package "ASDF"))
system)
(labels ((asdfsym (x) (find-symbol (string x) asdf))
(asdfcall (fun &rest rest) (apply (asdfsym fun) rest))
diff -rc ../ecl-11.1.1/src/configure ./src/configure
*** ../ecl-11.1.1/src/configure Sun Jan 16 13:39:59 2011
--- ./src/configure Thu Jan 5 07:06:11 2012
***************
*** 9033,9042 ****
if test "$cross_compiling" = yes; then :
! { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
! $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
! as_fn_error $? "cannot run test program while cross compiling
! See \`config.log' for more details" "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
--- 9033,9039 ----
if test "$cross_compiling" = yes; then :
! :
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
***************
*** 9189,9194 ****
--- 9186,9195 ----
CLX_INFO=""
fi
+ if test "${with_tcp}" = "builtin"; then
+ LSP_FEATURES="(cons :builtin-sockets ${LSP_FEATURES})"
+ with_tcp=yes
+ fi
if test "${with_tcp}" = "yes"; then
$as_echo "#define TCP 1" >>confdefs.h
diff -rc ../ecl-11.1.1/src/gc/darwin_stop_world.c ./src/gc/darwin_stop_world.c
*** ../ecl-11.1.1/src/gc/darwin_stop_world.c Sun Jan 16 13:40:00 2011
--- ./src/gc/darwin_stop_world.c Thu Jan 5 07:06:11 2012
***************
*** 174,179 ****
--- 174,201 ----
GC_push_one(state . THREAD_FLD (r29));
GC_push_one(state . THREAD_FLD (r30));
GC_push_one(state . THREAD_FLD (r31));
+
+ # elif defined(ARM32)
+ lo = (void*)state.__sp;
+
+ GC_push_one(state.__r[0]);
+ GC_push_one(state.__r[1]);
+ GC_push_one(state.__r[2]);
+ GC_push_one(state.__r[3]);
+ GC_push_one(state.__r[4]);
+ GC_push_one(state.__r[5]);
+ GC_push_one(state.__r[6]);
+ GC_push_one(state.__r[7]);
+ GC_push_one(state.__r[8]);
+ GC_push_one(state.__r[9]);
+ GC_push_one(state.__r[10]);
+ GC_push_one(state.__r[11]);
+ GC_push_one(state.__r[12]);
+ /* GC_push_one(state.__sp); */
+ GC_push_one(state.__lr);
+ GC_push_one(state.__pc);
+ GC_push_one(state.__cpsr);
+
# else
# error FIXME for non-x86 || ppc architectures
# endif
***************
*** 323,328 ****
--- 345,380 ----
GC_push_one(info . THREAD_FLD (fs));
GC_push_one(info . THREAD_FLD (gs));
+ # elif defined(ARM32)
+ GC_THREAD_STATE_T info;
+ mach_msg_type_number_t outCount = THREAD_STATE_MAX;
+ r = thread_get_state(thread, GC_MACH_THREAD_STATE, (natural_t *)&info,
+ &outCount);
+ if(r != KERN_SUCCESS)
+ ABORT("task_get_state failed");
+
+ hi = (ptr_t)FindTopOfStack(info . __sp);
+
+ lo = (void*)info.__sp;
+
+ GC_push_one(info.__r[0]);
+ GC_push_one(info.__r[1]);
+ GC_push_one(info.__r[2]);
+ GC_push_one(info.__r[3]);
+ GC_push_one(info.__r[4]);
+ GC_push_one(info.__r[5]);
+ GC_push_one(info.__r[6]);
+ GC_push_one(info.__r[7]);
+ GC_push_one(info.__r[8]);
+ GC_push_one(info.__r[9]);
+ GC_push_one(info.__r[10]);
+ GC_push_one(info.__r[11]);
+ GC_push_one(info.__r[12]);
+ /* GC_push_one(info.__sp); */
+ GC_push_one(info.__lr);
+ GC_push_one(info.__pc);
+ GC_push_one(info.__cpsr);
+
# else
# error FIXME for non-x86 || ppc architectures
# endif
diff -rc ../ecl-11.1.1/src/gc/include/private/gc_priv.h ./src/gc/include/private/gc_priv.h
*** ../ecl-11.1.1/src/gc/include/private/gc_priv.h Sun Jan 16 13:40:00 2011
--- ./src/gc/include/private/gc_priv.h Thu Jan 5 07:06:11 2012
***************
*** 401,409 ****
# define GC_GETSECTBYNAME getsectbynamefromheader_64
# endif
# else
! # error define GC_THREAD_STATE_T
! # define GC_MACH_THREAD_STATE MACHINE_THREAD_STATE
! # define GC_MACH_THREAD_STATE_COUNT MACHINE_THREAD_STATE_COUNT
# endif
/* Try to work out the right way to access thread state structure members.
The structure has changed its definition in different Darwin versions.
--- 401,413 ----
# define GC_GETSECTBYNAME getsectbynamefromheader_64
# endif
# else
! # if defined(ARM32)
! # define GC_THREAD_STATE_T arm_thread_state_t
! # else
! # error define GC_THREAD_STATE_T
! # endif
! # define GC_MACH_THREAD_STATE MACHINE_THREAD_STATE
! # define GC_MACH_THREAD_STATE_COUNT MACHINE_THREAD_STATE_COUNT
# endif
/* Try to work out the right way to access thread state structure members.
The structure has changed its definition in different Darwin versions.
diff -rc ../ecl-11.1.1/src/gc/include/private/gcconfig.h ./src/gc/include/private/gcconfig.h
*** ../ecl-11.1.1/src/gc/include/private/gcconfig.h Sun Jan 16 13:40:00 2011
--- ./src/gc/include/private/gcconfig.h Thu Jan 5 07:06:11 2012
***************
*** 61,73 ****
# define FREEBSD
# endif
/* Determine the machine type: */
# if defined(__arm__) || defined(__thumb__)
# define ARM32
! # if !defined(LINUX) && !defined(NETBSD)
# define NOSYS
# define mach_type_known
# endif
# endif
# if defined(sun) && defined(mc68000)
# error SUNOS4 no longer supported
--- 61,82 ----
# define FREEBSD
# endif
+ /* And one for Darwin: */
+ # if defined(macosx) || (defined(__APPLE__) && defined(__MACH__))
+ # define DARWIN
+ # endif
+
/* Determine the machine type: */
# if defined(__arm__) || defined(__thumb__)
# define ARM32
! # if !defined(LINUX) && !defined(NETBSD) && !defined(DARWIN)
# define NOSYS
# define mach_type_known
# endif
+ # elif defined(__arm__)
+ # define ARM32
+ # define mach_type_known
+ # define DARWIN_DONT_PARSE_STACK
# endif
# if defined(sun) && defined(mc68000)
# error SUNOS4 no longer supported
***************
*** 290,297 ****
# define MACOS
# define mach_type_known
# endif
! # if defined(macosx) || (defined(__APPLE__) && defined(__MACH__))
! # define DARWIN
# if defined(__ppc__) || defined(__ppc64__)
# define POWERPC
# define mach_type_known
--- 299,305 ----
# define MACOS
# define mach_type_known
# endif
! # if defined(DARWIN)
# if defined(__ppc__) || defined(__ppc64__)
# define POWERPC
# define mach_type_known
***************
*** 301,306 ****
--- 309,318 ----
# elif defined(__i386__)
# define I386
# define mach_type_known
+ # elif defined(__arm__)
+ # define ARM32
+ # define mach_type_known
+ # define DARWIN_DONT_PARSE_STACK
# endif
# endif
# if defined(NeXT) && defined(mc68000)
***************
*** 748,761 ****
/* HEURISTIC1 has been reliably reported to fail for a 32-bit */
/* executable on a 64 bit kernel. */
# define LINUX_STACKBOTTOM
! # define DYNAMIC_LOADING
# define SEARCH_FOR_DATA_START
extern int _end[];
# define DATAEND (_end)
# endif
# ifdef DARWIN
# define OS_TYPE "DARWIN"
! # define DYNAMIC_LOADING
# if defined(__ppc64__)
# define ALIGNMENT 8
# define CPP_WORDSZ 64
--- 760,781 ----
/* HEURISTIC1 has been reliably reported to fail for a 32-bit */
/* executable on a 64 bit kernel. */
# define LINUX_STACKBOTTOM
! # ifdef IPHONE
! # undef DYNAMIC_LOADING
! # else
! # define DYNAMIC_LOADING
! # endif
# define SEARCH_FOR_DATA_START
extern int _end[];
# define DATAEND (_end)
# endif
# ifdef DARWIN
# define OS_TYPE "DARWIN"
! # ifdef IPHONE
! # undef DYNAMIC_LOADING
! # else
! # define DYNAMIC_LOADING
! # endif
# if defined(__ppc64__)
# define ALIGNMENT 8
# define CPP_WORDSZ 64
***************
*** 772,779 ****
These aren't used when dyld support is enabled (it is by default) */
# define DATASTART ((ptr_t) get_etext())
# define DATAEND ((ptr_t) get_end())
! # define USE_MMAP
! # define USE_MMAP_ANON
# ifdef GC_DARWIN_THREADS
# define MPROTECT_VDB
# endif
--- 792,804 ----
These aren't used when dyld support is enabled (it is by default) */
# define DATASTART ((ptr_t) get_etext())
# define DATAEND ((ptr_t) get_end())
! # ifdef IPHONE
! # undef USE_MMAP
! # undef USE_MMAP_ANON
! # else
! # define USE_MMAP
! # define USE_MMAP_ANON
! # endif
# ifdef GC_DARWIN_THREADS
# define MPROTECT_VDB
# endif
***************
*** 831,838 ****
# define CPP_WORDSZ 32
# define STACKBOTTOM ((ptr_t)((ulong)&errno))
# endif
! # define USE_MMAP
! # define USE_MMAP_ANON
/* From AIX linker man page:
_text Specifies the first location of the program.
_etext Specifies the first location after the program.
--- 856,868 ----
# define CPP_WORDSZ 32
# define STACKBOTTOM ((ptr_t)((ulong)&errno))
# endif
! # ifdef IPHONE
! # undef USE_MMAP
! # undef USE_MMAP_ANON
! # else
! # define USE_MMAP
! # define USE_MMAP_ANON
! # endif
/* From AIX linker man page:
_text Specifies the first location of the program.
_etext Specifies the first location after the program.
***************
*** 1282,1288 ****
# ifdef DARWIN
# define OS_TYPE "DARWIN"
# define DARWIN_DONT_PARSE_STACK
! # define DYNAMIC_LOADING
/* XXX: see get_end(3), get_etext() and get_end() should not be used.
These aren't used when dyld support is enabled (it is by default) */
# define DATASTART ((ptr_t) get_etext())
--- 1312,1322 ----
# ifdef DARWIN
# define OS_TYPE "DARWIN"
# define DARWIN_DONT_PARSE_STACK
! # ifdef IPHONE
! # undef DYNAMIC_LOADING
! # else
! # define DYNAMIC_LOADING
! # endif
/* XXX: see get_end(3), get_etext() and get_end() should not be used.
These aren't used when dyld support is enabled (it is by default) */
# define DATASTART ((ptr_t) get_etext())
***************
*** 1319,1325 ****
/* This was developed for a linuxce style platform. Probably */
/* needs to be tweaked for workstation class machines. */
# define OS_TYPE "LINUX"
! # define DYNAMIC_LOADING
extern int _end[];
# define DATAEND (_end)
extern int __data_start[];
--- 1353,1363 ----
/* This was developed for a linuxce style platform. Probably */
/* needs to be tweaked for workstation class machines. */
# define OS_TYPE "LINUX"
! # ifdef IPHONE
! # undef DYNAMIC_LOADING
! # else
! # define DYNAMIC_LOADING
! # endif
extern int _end[];
# define DATAEND (_end)
extern int __data_start[];
***************
*** 1771,1776 ****
--- 1809,1826 ----
# define OS_TYPE "MSWINCE"
# define DATAEND /* not needed */
# endif
+ # ifdef DARWIN
+ /* iPhone */
+ # define OS_TYPE "DARWIN"
+ # define DATASTART ((ptr_t) get_etext())
+ # define DATAEND ((ptr_t) get_end())
+ /* #define STACKBOTTOM ((ptr_t) 0x30000000) */ /* FIXME: Is this needed? */
+ # define HEURISTIC1
+ # ifndef USE_MMAP
+ # define USE_MMAP
+ # endif
+ # define USE_MMAP_ANON
+ # endif
# ifdef NOSYS
/* __data_start is usually defined in the target linker script. */
extern int __data_start[];
***************
*** 1796,1801 ****
--- 1846,1863 ----
# ifdef SH
# define MACH_TYPE "SH"
# define ALIGNMENT 4
+ # ifdef DARWIN
+ /* iPhone */
+ # define OS_TYPE "DARWIN"
+ # define DATASTART ((ptr_t) get_etext())
+ # define DATAEND ((ptr_t) get_end())
+ /* #define STACKBOTTOM ((ptr_t) 0x30000000) */ /* FIXME: Is this needed? */
+ # define HEURISTIC1
+ # ifndef USE_MMAP
+ # define USE_MMAP
+ # endif
+ # define USE_MMAP_ANON
+ # endif
# ifdef MSWINCE
# define OS_TYPE "MSWINCE"
# define DATAEND /* not needed */
***************
*** 1832,1838 ****
# define LINUX_STACKBOTTOM
# undef STACK_GRAN
# define STACK_GRAN 0x10000000
! # define DYNAMIC_LOADING
# define SEARCH_FOR_DATA_START
extern int _end[];
# define DATAEND (_end)
--- 1894,1904 ----
# define LINUX_STACKBOTTOM
# undef STACK_GRAN
# define STACK_GRAN 0x10000000
! # ifdef IPHONE
! # undef DYNAMIC_LOADING
! # else
! # define DYNAMIC_LOADING
! # endif
# define SEARCH_FOR_DATA_START
extern int _end[];
# define DATAEND (_end)
***************
*** 1879,1885 ****
# ifdef DARWIN
# define OS_TYPE "DARWIN"
# define DARWIN_DONT_PARSE_STACK
! # define DYNAMIC_LOADING
/* XXX: see get_end(3), get_etext() and get_end() should not be used.
These aren't used when dyld support is enabled (it is by default) */
# define DATASTART ((ptr_t) get_etext())
--- 1945,1955 ----
# ifdef DARWIN
# define OS_TYPE "DARWIN"
# define DARWIN_DONT_PARSE_STACK
! # ifdef IPHONE
! # undef DYNAMIC_LOADING
! # else
! # define DYNAMIC_LOADING
! # endif
/* XXX: see get_end(3), get_etext() and get_end() should not be used.
These aren't used when dyld support is enabled (it is by default) */
# define DATASTART ((ptr_t) get_etext())
diff -rc ../ecl-11.1.1/src/gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/arm.h ./src/gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/arm.h
*** ../ecl-11.1.1/src/gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/arm.h Sun Jan 16 13:40:00 2011
--- ./src/gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/arm.h Thu Jan 5 07:06:11 2012
***************
*** 32,41 ****
*/
/* NEC LE-IT: gcc has no way to easily check the arm architecture
! * but defines only one of __ARM_ARCH_x__ to be true */
! #if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_7__)
AO_INLINE void
! AO_nop_full()
{
#ifndef AO_UNIPROCESSOR
/* issue an data memory barrier (keeps ordering of memory transactions */
--- 32,47 ----
*/
/* NEC LE-IT: gcc has no way to easily check the arm architecture
! * but defines only one of __ARM_ARCH_x__ to be true */
! #if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
! || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__) \
! || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
! || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7R__)
!
! #include "../standard_ao_double_t.h"
!
AO_INLINE void
! AO_nop_full(void)
{
#ifndef AO_UNIPROCESSOR
/* issue an data memory barrier (keeps ordering of memory transactions */
***************
*** 49,59 ****
/* NEC LE-IT: AO_t load is simple reading */
AO_INLINE AO_t
! AO_load(volatile AO_t *addr)
{
! /* Cast away the volatile for architectures like IA64 where */
! /* volatile adds barrier semantics. */
! return (*(AO_t *)addr);
}
#define AO_HAVE_load
--- 55,65 ----
/* NEC LE-IT: AO_t load is simple reading */
AO_INLINE AO_t
! AO_load(const volatile AO_t *addr)
{
! /* Cast away the volatile for architectures like IA64 where */
! /* volatile adds barrier semantics. */
! return (*(const AO_t *)addr);
}
#define AO_HAVE_load
***************
*** 84,99 ****
*/
AO_INLINE void AO_store(volatile AO_t *addr, AO_t value)
{
! unsigned long tmp;
! __asm__ __volatile__("@AO_store\n"
! "1: ldrex %0, [%1]\n"
! " strex %0, %2, [%1]\n"
! " teq %0, #0\n"
! " bne 1b"
! : "=&r"(tmp)
! : "r" (addr), "r"(value)
! : "cc","memory");
}
#define AO_HAVE_store
--- 90,105 ----
*/
AO_INLINE void AO_store(volatile AO_t *addr, AO_t value)
{
! AO_t flag;
! __asm__ __volatile__("@AO_store\n"
! "1: ldrex %0, [%2]\n"
! " strex %0, %3, [%2]\n"
! " teq %0, #0\n"
! " bne 1b"
! : "=&r"(flag), "+m"(*addr)
! : "r" (addr), "r"(value)
! : "cc");
}
#define AO_HAVE_store
***************
*** 111,130 ****
*/
AO_INLINE AO_TS_t
AO_test_and_set(volatile AO_TS_t *addr) {
-
- AO_TS_t oldval;
- unsigned long tmp;
-
- __asm__ __volatile__("@AO_test_and_set\n"
- "1: ldrex %0, [%2]\n"
- " strex %1, %3, [%2]\n"
- " teq %1, #0\n"
- " bne 1b\n"
- : "=&r"(oldval),"=&r"(tmp)
- : "r"(addr), "r"(1)
- : "memory","cc");
! return oldval;
}
#define AO_HAVE_test_and_set
--- 117,136 ----
*/
AO_INLINE AO_TS_t
AO_test_and_set(volatile AO_TS_t *addr) {
! AO_TS_t oldval;
! unsigned long flag;
!
! __asm__ __volatile__("@AO_test_and_set\n"
! "1: ldrex %0, [%3]\n"
! " strex %1, %4, [%3]\n"
! " teq %1, #0\n"
! " bne 1b\n"
! : "=&r"(oldval),"=&r"(flag), "+m"(*addr)
! : "r"(addr), "r"(1)
! : "cc");
!
! return oldval;
}
#define AO_HAVE_test_and_set
***************
*** 133,152 ****
AO_INLINE AO_t
AO_fetch_and_add(volatile AO_t *p, AO_t incr)
{
! unsigned long tmp,tmp2;
! AO_t result;
! __asm__ __volatile__("@AO_fetch_and_add\n"
! "1: ldrex %0, [%4]\n" /* get original */
! " add %2, %3, %0\n" /* sum up */
! " strex %1, %2, [%4]\n" /* store them */
! " teq %1, #0\n"
! " bne 1b\n"
! : "=&r"(result),"=&r"(tmp),"=&r"(tmp2)
! : "r"(incr), "r"(p)
! : "cc","memory");
! return result;
}
#define AO_HAVE_fetch_and_add
--- 139,158 ----
AO_INLINE AO_t
AO_fetch_and_add(volatile AO_t *p, AO_t incr)
{
! unsigned long flag,tmp;
! AO_t result;
! __asm__ __volatile__("@AO_fetch_and_add\n"
! "1: ldrex %0, [%5]\n" /* get original */
! " add %2, %0, %4\n" /* sum up in incr */
! " strex %1, %2, [%5]\n" /* store them */
! " teq %1, #0\n"
! " bne 1b\n"
! : "=&r"(result),"=&r"(flag),"=&r"(tmp),"+m"(*p) /* 0..3 */
! : "r"(incr), "r"(p) /* 4..5 */
! : "cc");
! return result;
}
#define AO_HAVE_fetch_and_add
***************
*** 155,174 ****
AO_INLINE AO_t
AO_fetch_and_add1(volatile AO_t *p)
{
! unsigned long tmp,tmp2;
! AO_t result;
! __asm__ __volatile__("@AO_fetch_and_add1\n"
! "1: ldrex %0, [%3]\n" /* get original */
! " add %1, %0, #1\n" /* increment */
! " strex %2, %1, [%3]\n" /* store them */
! " teq %2, #0\n"
! " bne 1b\n"
! : "=&r"(result), "=&r"(tmp), "=&r"(tmp2)
! : "r"(p)
! : "cc","memory");
! return result;
}
#define AO_HAVE_fetch_and_add1
--- 161,180 ----
AO_INLINE AO_t
AO_fetch_and_add1(volatile AO_t *p)
{
! unsigned long flag,tmp;
! AO_t result;
! __asm__ __volatile__("@AO_fetch_and_add1\n"
! "1: ldrex %0, [%4]\n" /* get original */
! " add %1, %0, #1\n" /* increment */
! " strex %2, %1, [%4]\n" /* store them */
! " teq %2, #0\n"
! " bne 1b\n"
! : "=&r"(result), "=&r"(tmp), "=&r"(flag), "+m"(*p)
! : "r"(p)
! : "cc");
! return result;
}
#define AO_HAVE_fetch_and_add1
***************
*** 177,196 ****
AO_INLINE AO_t
AO_fetch_and_sub1(volatile AO_t *p)
{
! unsigned long tmp,tmp2;
! AO_t result;
! __asm__ __volatile__("@ AO_fetch_and_sub1\n"
! "1: ldrex %0, [%3]\n" /* get original */
! " sub %1, %0, #1\n" /* increment */
! " strex %2, %1, [%3]\n" /* store them */
! " teq %2, #0\n"
! " bne 1b\n"
! : "=&r"(result), "=&r"(tmp), "=&r"(tmp2)
! : "r"(p)
! : "cc","memory");
! return result;
}
#define AO_HAVE_fetch_and_sub1
--- 183,202 ----
AO_INLINE AO_t
AO_fetch_and_sub1(volatile AO_t *p)
{
! unsigned long flag,tmp;
! AO_t result;
! __asm__ __volatile__("@AO_fetch_and_sub1\n"
! "1: ldrex %0, [%4]\n" /* get original */
! " sub %1, %0, #1\n" /* decrement */
! " strex %2, %1, [%4]\n" /* store them */
! " teq %2, #0\n"
! " bne 1b\n"
! : "=&r"(result), "=&r"(tmp), "=&r"(flag), "+m"(*p)
! : "r"(p)
! : "cc");
! return result;
}
#define AO_HAVE_fetch_and_sub1
***************
*** 199,224 ****
/* Returns nonzero if the comparison succeeded. */
AO_INLINE int
AO_compare_and_swap(volatile AO_t *addr,
! AO_t old_val, AO_t new_val)
{
! AO_t result,tmp;
! __asm__ __volatile__("@ AO_compare_and_swap\n"
! "1: ldrex %1, [%2]\n" /* get original */
! " mov %0, #2\n" /* store a flag */
! " teq %1, %3\n" /* see if match */
! " strexeq %0, %4, [%2]\n" /* store new one if matched */
! " teq %0, #1\n"
! " beq 1b\n" /* if update failed, repeat */
! " eor %0, %0, #2\n" /* if succeded, return 2, else 0 */
! : "=&r"(result), "=&r"(tmp)
! : "r"(addr), "r"(old_val), "r"(new_val)
! : "cc","memory");
! return (result>>1);
}
#define AO_HAVE_compare_and_swap
#else
/* pre ARMv6 architecures ... */
--- 205,261 ----
/* Returns nonzero if the comparison succeeded. */
AO_INLINE int
AO_compare_and_swap(volatile AO_t *addr,
! AO_t old_val, AO_t new_val)
{
! AO_t result,tmp;
! __asm__ __volatile__("@ AO_compare_and_swap\n"
! "1: mov %0, #2\n" /* store a flag */
! " ldrex %1, [%3]\n" /* get original */
! " teq %1, %4\n" /* see if match */
! # ifdef __thumb__
! " it eq\n"
! # endif
! " strexeq %0, %5, [%3]\n" /* store new one if matched */
! " teq %0, #1\n"
! " beq 1b\n" /* if update failed, repeat */
! : "=&r"(result), "=&r"(tmp), "+m"(*addr)
! : "r"(addr), "r"(old_val), "r"(new_val)
! : "cc");
! return !(result&2); /* if succeded, return 1, else 0 */
}
#define AO_HAVE_compare_and_swap
+ AO_INLINE int
+ AO_compare_double_and_swap_double(volatile AO_double_t *addr,
+ AO_t old_val1, AO_t old_val2,
+ AO_t new_val1, AO_t new_val2)
+ {
+ double_ptr_storage old_val = ((double_ptr_storage)old_val2 << 32) | old_val1;