Commit 62c0fb87 by Michael Meissner

Correctly handle saving toc space in NT

From-SVN: r12946
parent 91760fce
...@@ -95,9 +95,6 @@ char *rs6000_sdata_name = (char *)0; ...@@ -95,9 +95,6 @@ char *rs6000_sdata_name = (char *)0;
/* Whether a System V.4 varargs area was created. */ /* Whether a System V.4 varargs area was created. */
int rs6000_sysv_varargs_p; int rs6000_sysv_varargs_p;
/* Whether we need to save the TOC register. */
int rs6000_save_toc_p;
/* ABI enumeration available for subtarget to use. */ /* ABI enumeration available for subtarget to use. */
enum rs6000_abi rs6000_current_abi; enum rs6000_abi rs6000_current_abi;
...@@ -2236,7 +2233,6 @@ rs6000_save_machine_status (p) ...@@ -2236,7 +2233,6 @@ rs6000_save_machine_status (p)
p->machine = machine; p->machine = machine;
machine->sysv_varargs_p = rs6000_sysv_varargs_p; machine->sysv_varargs_p = rs6000_sysv_varargs_p;
machine->save_toc_p = rs6000_save_toc_p;
machine->fpmem_size = rs6000_fpmem_size; machine->fpmem_size = rs6000_fpmem_size;
machine->fpmem_offset = rs6000_fpmem_offset; machine->fpmem_offset = rs6000_fpmem_offset;
} }
...@@ -2248,7 +2244,6 @@ rs6000_restore_machine_status (p) ...@@ -2248,7 +2244,6 @@ rs6000_restore_machine_status (p)
struct machine_function *machine = p->machine; struct machine_function *machine = p->machine;
rs6000_sysv_varargs_p = machine->sysv_varargs_p; rs6000_sysv_varargs_p = machine->sysv_varargs_p;
rs6000_save_toc_p = machine->save_toc_p;
rs6000_fpmem_size = machine->fpmem_size; rs6000_fpmem_size = machine->fpmem_size;
rs6000_fpmem_offset = machine->fpmem_offset; rs6000_fpmem_offset = machine->fpmem_offset;
...@@ -2263,7 +2258,6 @@ rs6000_init_expanders () ...@@ -2263,7 +2258,6 @@ rs6000_init_expanders ()
{ {
/* Reset varargs and save TOC indicator */ /* Reset varargs and save TOC indicator */
rs6000_sysv_varargs_p = 0; rs6000_sysv_varargs_p = 0;
rs6000_save_toc_p = 0;
rs6000_fpmem_size = 0; rs6000_fpmem_size = 0;
rs6000_fpmem_offset = 0; rs6000_fpmem_offset = 0;
pic_offset_table_rtx = (rtx)0; pic_offset_table_rtx = (rtx)0;
...@@ -3023,8 +3017,8 @@ rs6000_stack_info () ...@@ -3023,8 +3017,8 @@ rs6000_stack_info ()
/* Does this function call anything? */ /* Does this function call anything? */
info_ptr->calls_p = rs6000_makes_calls (); info_ptr->calls_p = rs6000_makes_calls ();
/* Do we need to allocate space to save the toc? */ /* Allocate space to save the toc. */
if (rs6000_save_toc_p) if (abi == ABI_NT)
{ {
info_ptr->toc_save_p = 1; info_ptr->toc_save_p = 1;
info_ptr->toc_size = reg_size; info_ptr->toc_size = reg_size;
...@@ -3483,10 +3477,6 @@ output_prolog (file, size) ...@@ -3483,10 +3477,6 @@ output_prolog (file, size)
reg_names[sp_reg]); reg_names[sp_reg]);
} }
if (info->toc_save_p)
asm_fprintf (file, store_reg, reg_names[2], info->toc_save_offset + sp_offset,
reg_names[sp_reg]);
/* NT needs us to probe the stack frame every 4k pages for large frames, so /* NT needs us to probe the stack frame every 4k pages for large frames, so
do it here. */ do it here. */
if (DEFAULT_ABI == ABI_NT && info->total_size > 4096) if (DEFAULT_ABI == ABI_NT && info->total_size > 4096)
......
...@@ -7212,7 +7212,6 @@ ...@@ -7212,7 +7212,6 @@
else if (DEFAULT_ABI == ABI_NT) else if (DEFAULT_ABI == ABI_NT)
{ {
/* NT function pointers are really pointers to a two word area */ /* NT function pointers are really pointers to a two word area */
rs6000_save_toc_p = 1;
emit_call_insn (gen_call_indirect_nt (force_reg (Pmode, operands[0]), emit_call_insn (gen_call_indirect_nt (force_reg (Pmode, operands[0]),
operands[1], operands[2], operands[1], operands[2],
toc_addr, toc_reg)); toc_addr, toc_reg));
...@@ -7272,7 +7271,6 @@ ...@@ -7272,7 +7271,6 @@
else if (DEFAULT_ABI == ABI_NT) else if (DEFAULT_ABI == ABI_NT)
{ {
/* NT function pointers are really pointers to a two word area */ /* NT function pointers are really pointers to a two word area */
rs6000_save_toc_p = 1;
emit_call_insn (gen_call_value_indirect_nt (operands[0], emit_call_insn (gen_call_value_indirect_nt (operands[0],
force_reg (Pmode, operands[1]), force_reg (Pmode, operands[1]),
operands[2], operands[3], operands[2], operands[3],
......
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