summaryrefslogtreecommitdiff
path: root/lang/gprolog/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/gprolog/files')
-rw-r--r--lang/gprolog/files/patch-EnginePl_machine.h9
-rw-r--r--lang/gprolog/files/patch-Ma2Asm_x86__64__any.c70
2 files changed, 25 insertions, 54 deletions
diff --git a/lang/gprolog/files/patch-EnginePl_machine.h b/lang/gprolog/files/patch-EnginePl_machine.h
index 69bb186b924b..f060b21b8e5d 100644
--- a/lang/gprolog/files/patch-EnginePl_machine.h
+++ b/lang/gprolog/files/patch-EnginePl_machine.h
@@ -9,12 +9,3 @@
#ifdef NO_USE_EBP
# define M_USED_REGS {"ebx", 0}
-@@ -137,7 +137,7 @@ void M_Check_Magic_Words(void); /* not c
- # define M_USED_REGS {"15", "20", 0}
-
- /* on M_x86_64_darwin Lion r12-r15 do not work (why ?) */
--#elif defined(M_x86_64) && !defined(_MSC_VER) && !defined(M_x86_64_darwin)
-+#elif defined(M_x86_64) && !defined(_MSC_VER) && !defined(M_x86_64_darwin) && !defined(__clang__)
-
- # define M_USED_REGS {"r12", "r13", "r14", "r15", 0}
-
diff --git a/lang/gprolog/files/patch-Ma2Asm_x86__64__any.c b/lang/gprolog/files/patch-Ma2Asm_x86__64__any.c
index 20af1004559d..152304e563b2 100644
--- a/lang/gprolog/files/patch-Ma2Asm_x86__64__any.c
+++ b/lang/gprolog/files/patch-Ma2Asm_x86__64__any.c
@@ -1,57 +1,37 @@
---- Ma2Asm/x86_64_any.c.orig 2018-10-23 15:17:17 UTC
-+++ Ma2Asm/x86_64_any.c
-@@ -112,6 +112,9 @@
- * Global Variables *
- *---------------------------------*/
-
-+int can_produce_pic_code = 1; /* overwritte var of ma2asm.c */
-+extern int pic_code;
-+
- static double dbl_tbl[MAX_DOUBLES_IN_PRED];
- static int nb_dbl = 0;
- static int dbl_lc_no = 0;
-@@ -149,7 +152,6 @@ static const char *fpr_arg[MAX_FPR_ARGS]
- #endif
- /* variables for ma_parser.c / ma2asm.c */
-
--int can_produce_pic_code = 1;
- char *comment_prefix = "#";
- #ifdef M_x86_64_darwin
- char *local_symb_prefix = "L";
-@@ -210,10 +212,8 @@ Asm_Start(void)
+--- Ma2Asm/x86_64_any.c.orig 2021-07-07 17:13:02.000000000 +0700
++++ Ma2Asm/x86_64_any.c 2021-07-11 03:18:18.347365000 +0700
+@@ -232,8 +232,8 @@ Asm_Start(void)
strcpy(asm_reg_cp, Off_Reg_Bank(MAP_OFFSET_CP));
#endif
--#if defined(M_x86_64_darwin) || defined(M_x86_64_bsd)
-- pic_code = 1; /* NB: on darwin and BSD everything is PIC code */
--#elif defined(M_x86_64_linux) && __GNUC__ >= 6 /* gcc >= 6 needs PIC for linux */
-- pic_code = 1;
-+#ifdef M_x86_64_darwin
-+ pic_code = 1; /* NB: on darwin everything is PIC code */
+-#if defined(M_darwin) || defined(M_bsd)
+- pic_code = TRUE; /* NB: on darwin and BSD everything is PIC code */
++#if defined(M_darwin)
++ pic_code = TRUE; /* NB: on darwin everything is PIC code */
+ #elif defined(M_linux) && __GNUC__ >= 6 /* gcc >= 6 needs PIC for linux */
+ pic_code = FALSE;
#elif defined(_WIN32)
- pic_code = 0; /* NB: on MinGW nothing is needed for PIC code */
- #endif
-@@ -1199,9 +1199,9 @@ Dico_Long(char *name, int global, VType
- size_bytes = value * 8;
- #ifdef M_x86_64_darwin
- if (!global)
-- Label_Printf(".zerofill __DATA,__bss," UN "%s,%" PL_FMT_d ",4", name, size_bytes);
-+ Label_Printf(".zerofill __DATA,__bss," UN "%s,%" PL_FMT_d ",3", name, size_bytes);
+@@ -1242,9 +1242,9 @@ Dico_Long(LongInf *l)
+ size_bytes = l->value * 8;
+ #ifdef M_darwin
+ if (!l->global)
+- Label_Printf(".zerofill __DATA,__bss," UN "%s,%" PL_FMT_d ",4", l->name, size_bytes);
++ Label_Printf(".zerofill __DATA,__bss," UN "%s,%" PL_FMT_d ",3", l->name, size_bytes);
else
-- Inst_Printf(".comm", UN "%s,%" PL_FMT_d ",4", name, size_bytes);
-+ Inst_Printf(".comm", UN "%s,%" PL_FMT_d ",3", name, size_bytes);
+- Inst_Printf(".comm", UN "%s,%" PL_FMT_d ",4", l->name, size_bytes);
++ Inst_Printf(".comm", UN "%s,%" PL_FMT_d ",3", l->name, size_bytes);
#else
- #if defined(M_x86_64_linux) || defined(M_x86_64_sco) || \
- defined(M_x86_64_solaris) || defined(M_x86_64_bsd)
-@@ -1226,11 +1226,6 @@ Dico_Long(char *name, int global, VType
+ #if defined(M_linux) || defined(M_sco) || defined(M_solaris) || defined(M_bsd)
+ if (!l->global)
+@@ -1268,11 +1268,6 @@ Dico_Long(LongInf *l)
case INITIAL_VALUE:
- if (global)
- Inst_Printf(".globl", UN "%s", name);
--#ifdef M_x86_64_darwin
+ if (l->global)
+ Inst_Printf(".globl", UN "%s", l->name);
+-#ifdef M_darwin
- Inst_Printf(".align", "3");
-#else
- Inst_Printf(".align", "8");
-#endif
- #if !(defined(M_x86_64_darwin) || defined(_WIN32))
- Inst_Printf(".size", UN "%s,8", name);
+ #if !(defined(M_darwin) || defined(_WIN32))
+ Inst_Printf(".size", UN "%s,8", l->name);
#endif