Commit ef7a1424 by Richard Kenner

(output_prolog): Fixup code to set stack pointer if stack size > 32k.

From-SVN: r10252
parent a7818044
...@@ -2538,11 +2538,12 @@ output_prolog (file, size) ...@@ -2538,11 +2538,12 @@ output_prolog (file, size)
reg_names[1], - info->total_size, reg_names[1]); reg_names[1], - info->total_size, reg_names[1]);
else else
{ {
int neg_size = - info->total_size;
asm_fprintf (file, "\t{liu|lis} %s,%d\n\t{oril|ori} %s,%s,%d\n", asm_fprintf (file, "\t{liu|lis} %s,%d\n\t{oril|ori} %s,%s,%d\n",
reg_names[0], (info->total_size >> 16) & 0xffff, reg_names[0], (neg_size >> 16) & 0xffff,
reg_names[0], reg_names[0], info->total_size & 0xffff); reg_names[0], reg_names[0], neg_size & 0xffff);
asm_fprintf (file, asm_fprintf (file,
(TARGET_64BIT) ? "\tstdux %s,%s,%s\n" : "\tstwux %s,%s,%s\n", (TARGET_64BIT) ? "\tstdux %s,%s,%s\n" : "\t{stux|stwux} %s,%s,%s\n",
reg_names[1], reg_names[1], reg_names[0]); reg_names[1], reg_names[1], reg_names[0]);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment