summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cgcode.c14
-rw-r--r--cginstructions.c5
2 files changed, 19 insertions, 0 deletions
diff --git a/cgcode.c b/cgcode.c
index b756f63..513bd2f 100644
--- a/cgcode.c
+++ b/cgcode.c
@@ -8759,7 +8759,16 @@ static void write_descriptor_curry_table (int arity,LABEL *code_label)
for (n=0; n<=arity; ++n){
#ifdef GEN_OBJ
# ifdef NEW_DESCRIPTORS
+# ifdef MACH_O64
+ store_2_words_in_data_section (n,(arity-n)<<4);
+# else
+# if defined (G_A64) && defined (LINUX)
+ if (pic_flag)
+ store_2_words_in_data_section (n,(arity-n)<<4);
+ else
+# endif
store_2_words_in_data_section (n,(arity-n)<<3);
+# endif
# else
store_2_words_in_data_section (n,n<<3);
# endif
@@ -8770,6 +8779,11 @@ static void write_descriptor_curry_table (int arity,LABEL *code_label)
# ifdef MACH_O64
w_as_word_in_data_section ((arity-n)<<4);
# else
+# if defined (G_A64) && defined (LINUX)
+ if (pic_flag)
+ w_as_word_in_data_section ((arity-n)<<4);
+ else
+# endif
w_as_word_in_data_section ((arity-n)<<3);
# endif
#else
diff --git a/cginstructions.c b/cginstructions.c
index 45dab01..ebbbf8f 100644
--- a/cginstructions.c
+++ b/cginstructions.c
@@ -866,6 +866,11 @@ INSTRUCTION_GRAPH g_load_des_i (LABEL *descriptor_label,int arity)
# ifdef MACH_O64
instruction->instruction_parameters[1].i=(arity<<4)+2;
# else
+# if defined (G_A64) && defined (LINUX)
+ if (pic_flag)
+ instruction->instruction_parameters[1].i=(arity<<4)+2;
+ else
+# endif
instruction->instruction_parameters[1].i=(arity<<3)+2;
# endif
#else