Commit 9973f4a2 by Richard Kenner

(call_operand): Any reg is valid for NT.

(output_prologue): Never need GP for Windows/NT.
Set SYMBOL_REF_FLAG in current function decl.

From-SVN: r9381
parent 1c3b948b
...@@ -369,7 +369,8 @@ call_operand (op, mode) ...@@ -369,7 +369,8 @@ call_operand (op, mode)
return 0; return 0;
return (GET_CODE (op) == SYMBOL_REF return (GET_CODE (op) == SYMBOL_REF
|| (GET_CODE (op) == REG && REGNO (op) == 27)); || (GET_CODE (op) == REG
&& (REGNO (op) == 27 || WINDOWS_NT)));
} }
/* Return 1 if OP is a valid Alpha comparison operator. Here we know which /* Return 1 if OP is a valid Alpha comparison operator. Here we know which
...@@ -1341,7 +1342,9 @@ output_prolog (file, size) ...@@ -1341,7 +1342,9 @@ output_prolog (file, size)
/* If we need a GP (we have a LDSYM insn or a CALL_INSN), load it first. /* If we need a GP (we have a LDSYM insn or a CALL_INSN), load it first.
Even if we are a static function, we still need to do this in case Even if we are a static function, we still need to do this in case
our address is taken and passed to something like qsort. */ our address is taken and passed to something like qsort.
We never need a GP for Windows/NT. */
alpha_function_needs_gp = 0; alpha_function_needs_gp = 0;
for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
...@@ -1356,12 +1359,15 @@ output_prolog (file, size) ...@@ -1356,12 +1359,15 @@ output_prolog (file, size)
break; break;
} }
if (alpha_function_needs_gp) if (WINDOWS_NT == 0)
fprintf (file, "\tldgp $29,0($27)\n"); {
if (alpha_function_needs_gp)
fprintf (file, "\tldgp $29,0($27)\n");
/* Put a label after the GP load so we can enter the function at it. */ /* Put a label after the GP load so we can enter the function at it. */
assemble_name (file, alpha_function_name); assemble_name (file, alpha_function_name);
fprintf (file, "..ng:\n"); fprintf (file, "..ng:\n");
}
/* Adjust the stack by the frame size. If the frame size is > 4096 /* Adjust the stack by the frame size. If the frame size is > 4096
bytes, we need to be sure we probe somewhere in the first and last bytes, we need to be sure we probe somewhere in the first and last
...@@ -1578,6 +1584,9 @@ output_epilog (file, size) ...@@ -1578,6 +1584,9 @@ output_epilog (file, size)
assemble_name (file, alpha_function_name); assemble_name (file, alpha_function_name);
fprintf (file, "\n"); fprintf (file, "\n");
inside_function = FALSE; inside_function = FALSE;
/* Show that we know this function if it is called again. */
SYMBOL_REF_FLAG (XEXP (DECL_RTL (current_function_decl), 0)) = 1;
} }
/* Debugging support. */ /* Debugging support. */
......
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