Commit e4bec638 by Richard Henderson Committed by Richard Henderson

alpha.c (print_operand): Remove.

        * config/alpha/alpha.c (print_operand) [+]: Remove.
        (alpha_end_function): Print nop if call at end of function.
        * config/alpha/alpha.h (PRINT_OPERAND_PUNCT_VALID_P): Remove +.
        * config/alpha/alpha.md (UNSPEC_LDGP1): New.
        (call_osf_1_er_noreturn, call_value_osf_1_er_noreturn): New.
        (call_osf_2_er_nogp, call_value_osf_2_er_nogp): New.
        (call_osf_2_er, call_value_osf_2_er): Merge the ldgp highpart into
        the call pattern. Update peepholes to match.

From-SVN: r123529
parent 44aea9ac
2007-04-05 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c (print_operand) [+]: Remove.
(alpha_end_function): Print nop if call at end of function.
* config/alpha/alpha.h (PRINT_OPERAND_PUNCT_VALID_P): Remove +.
* config/alpha/alpha.md (UNSPEC_LDGP1): New.
(call_osf_1_er_noreturn, call_value_osf_1_er_noreturn): New.
(call_osf_2_er_nogp, call_value_osf_2_er_nogp): New.
(call_osf_2_er, call_value_osf_2_er): Merge the ldgp highpart into
the call pattern. Update peepholes to match.
2007-04-05 Janis Johnson <janis187@us.ibm.com>
* doc/extend.texi (Other Builtins): Add decimal float variants
......
......@@ -4990,13 +4990,6 @@ print_operand (FILE *file, rtx x, int code)
fputc ((TARGET_FLOAT_VAX ? 'g' : 't'), file);
break;
case '+':
/* Generates a nop after a noreturn call at the very end of the
function. */
if (next_real_insn (current_output_insn) == 0)
fprintf (file, "\n\tnop");
break;
case '#':
if (alpha_this_literal_sequence_number == 0)
alpha_this_literal_sequence_number = alpha_next_sequence_number++;
......@@ -8221,6 +8214,17 @@ alpha_expand_epilogue (void)
void
alpha_end_function (FILE *file, const char *fnname, tree decl ATTRIBUTE_UNUSED)
{
rtx insn;
/* We output a nop after noreturn calls at the very end of the function to
ensure that the return address always remains in the caller's code range,
as not doing so might confuse unwinding engines. */
insn = get_last_insn ();
if (!INSN_P (insn))
insn = prev_active_insn (insn);
if (GET_CODE (insn) == CALL_INSN)
output_asm_insn (get_insn_template (CODE_FOR_nop, NULL), NULL);
#if TARGET_ABI_OPEN_VMS
alpha_write_linkage (file, fnname, decl);
#endif
......
......@@ -1363,14 +1363,11 @@ do { \
- Generates double precision suffix for floating point
instructions (t for IEEE, g for VAX)
+ Generates a nop instruction after a noreturn call at the very end
of the function
*/
#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
((CODE) == '/' || (CODE) == ',' || (CODE) == '-' || (CODE) == '~' \
|| (CODE) == '#' || (CODE) == '*' || (CODE) == '&' || (CODE) == '+')
|| (CODE) == '#' || (CODE) == '*' || (CODE) == '&')
/* Print a memory address as an operand to reference that memory location. */
......
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