Line 0
Link Here
|
|
|
1 |
--- asmrun/power.S.orig 2019-12-02 12:34:04 UTC |
2 |
+++ asmrun/power.S |
3 |
@@ -13,7 +13,7 @@ |
4 |
/* */ |
5 |
/**************************************************************************/ |
6 |
|
7 |
-#if defined(MODEL_ppc64le) |
8 |
+#if _CALL_ELF == 2 |
9 |
.abiversion 2 |
10 |
#endif |
11 |
|
12 |
@@ -42,7 +42,7 @@ |
13 |
#define CALLBACK_LINK_SIZE 16 |
14 |
#define CALLBACK_LINK_OFFSET 0 |
15 |
#endif |
16 |
-#if defined(MODEL_ppc64) |
17 |
+#if _CALL_ELF == 1 |
18 |
#define RESERVED_STACK 48 |
19 |
#define PARAM_SAVE_AREA (8*8) |
20 |
#define LR_SAVE 16 |
21 |
@@ -54,7 +54,7 @@ |
22 |
#define CALLBACK_LINK_SIZE 32 |
23 |
#define CALLBACK_LINK_OFFSET 48 |
24 |
#endif |
25 |
-#if defined(MODEL_ppc64le) |
26 |
+#if _CALL_ELF == 2 |
27 |
#define RESERVED_STACK 32 |
28 |
#define PARAM_SAVE_AREA 0 |
29 |
#define LR_SAVE 16 |
30 |
@@ -82,7 +82,7 @@ |
31 |
|
32 |
#endif |
33 |
|
34 |
-#if defined(MODEL_ppc64) |
35 |
+#if _CALL_ELF == 1 |
36 |
#define FUNCTION(name) \ |
37 |
.section ".opd","aw"; \ |
38 |
.align 3; \ |
39 |
@@ -98,7 +98,7 @@ |
40 |
|
41 |
#endif |
42 |
|
43 |
-#if defined(MODEL_ppc64le) |
44 |
+#if _CALL_ELF == 2 |
45 |
#define FUNCTION(name) \ |
46 |
.section ".text"; \ |
47 |
.globl name; \ |
48 |
@@ -157,7 +157,7 @@ |
49 |
|
50 |
#endif |
51 |
|
52 |
-#if defined(MODEL_ppc64) |
53 |
+#if _CALL_ELF == 1 |
54 |
.section ".opd","aw" |
55 |
#else |
56 |
.section ".text" |
57 |
@@ -338,14 +338,14 @@ FUNCTION(caml_c_call) |
58 |
#if defined(MODEL_ppc) |
59 |
mtctr 28 |
60 |
bctrl |
61 |
-#elif defined(MODEL_ppc64) |
62 |
+#elif _CALL_ELF == 1 |
63 |
ld 0, 0(28) |
64 |
mr 26, 2 /* save current TOC in a callee-save register */ |
65 |
mtctr 0 |
66 |
ld 2, 8(28) |
67 |
bctrl |
68 |
mr 2, 26 /* restore current TOC */ |
69 |
-#elif defined(MODEL_ppc64le) |
70 |
+#elif _CALL_ELF == 2 |
71 |
mtctr 28 |
72 |
mr 12, 28 |
73 |
mr 26, 2 /* save current TOC in a callee-save register */ |
74 |
@@ -514,14 +514,14 @@ FUNCTION(caml_start_program) |
75 |
#if defined(MODEL_ppc) |
76 |
mtctr 12 |
77 |
.L105: bctrl |
78 |
-#elif defined(MODEL_ppc64) |
79 |
+#elif _CALL_ELF == 1 |
80 |
ld 0, 0(12) |
81 |
mtctr 0 |
82 |
std 2, TOC_SAVE(1) |
83 |
ld 2, 8(12) |
84 |
.L105: bctrl |
85 |
ld 2, TOC_SAVE(1) |
86 |
-#elif defined(MODEL_ppc64le) |
87 |
+#elif _CALL_ELF == 2 |
88 |
mtctr 12 |
89 |
std 2, TOC_SAVE(1) |
90 |
.L105: bctrl |
91 |
@@ -634,7 +634,7 @@ FUNCTION(caml_callback3_exn) |
92 |
b .L102 |
93 |
ENDFUNCTION(caml_callback3_exn) |
94 |
|
95 |
-#if defined(MODEL_ppc64) |
96 |
+#if _CALL_ELF == 1 |
97 |
.section ".opd","aw" |
98 |
#else |
99 |
.section ".text" |