Commit 4e5b002b by Eric Botcazou Committed by Eric Botcazou

sparc.c (sparc_indent_opcode): New variable.

	* config/sparc/sparc.c (sparc_indent_opcode): New variable.
	(output_return): Do not test for the presence of the 'unimp' insn.
	Use 'current_function_uses_only_leaf_regs' and 'final_sequence'
	as predicates instead of custom ones.  Return raw strings when
	possible.
	(output_sibcall): Likewise.  Concatenate strings.
	(output_ubranch): Remove kludge for TurboSPARC.
	(output_cbranch): Remove 'noop' parameter.  Do not output 'nop'.
	(output_v9branch): Likewise.
	(print_operand): Use 'final_sequence' instead of 'dbr_sequence_length'.
	<#>: Set sparc_indent_opcode if the delay slot is filled.
	<(>: Likewise.
	<)>: New operand to emit the displacement from the saved PC on return.
	<@>: Remove.
	* config/sparc/sparc.h (sparc_indent_opcode): Declare it.
	(ASM_OUTPUT_OPCODE): New macro.
	(PRINT_OPERAND_PUNCT_VALID_P): Remove '^' and add ')'.
	* config/sparc/sparc.md (normal_branch, inverted_branch,
	normal_fp_branch, inverted_fp_branch, normal_fpe_branch,
	inverted_fpe_branch): Adjust call to output_cbranch.
	(normal_int_branch_sp64, inverted_int_branch_sp64): Adjust
	call to output_v9branch.
	* config/sparc/sparc-protos.h (output_cbranch): Adjust.
	(output_v9branch): Likewise.

From-SVN: r87198
parent 5826770c
2004-09-08 Eric Botcazou <ebotcazou@libertysurf.fr>
* config/sparc/sparc.c (sparc_indent_opcode): New variable.
(output_return): Do not test for the presence of the 'unimp' insn.
Use 'current_function_uses_only_leaf_regs' and 'final_sequence'
as predicates instead of custom ones. Return raw strings when
possible.
(output_sibcall): Likewise. Concatenate strings.
(output_ubranch): Remove kludge for TurboSPARC.
(output_cbranch): Remove 'noop' parameter. Do not output 'nop'.
(output_v9branch): Likewise.
(print_operand): Use 'final_sequence' instead of 'dbr_sequence_length'.
<#>: Set sparc_indent_opcode if the delay slot is filled.
<(>: Likewise.
<)>: New operand to emit the displacement from the saved PC on return.
<@>: Remove.
* config/sparc/sparc.h (sparc_indent_opcode): Declare it.
(ASM_OUTPUT_OPCODE): New macro.
(PRINT_OPERAND_PUNCT_VALID_P): Remove '^' and add ')'.
* config/sparc/sparc.md (normal_branch, inverted_branch,
normal_fp_branch, inverted_fp_branch, normal_fpe_branch,
inverted_fpe_branch): Adjust call to output_cbranch.
(normal_int_branch_sp64, inverted_int_branch_sp64): Adjust
call to output_v9branch.
* config/sparc/sparc-protos.h (output_cbranch): Adjust.
(output_v9branch): Likewise.
2004-09-08 Devang Patel <dpatel@apple.com>
* config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Add -segaddr,
......
......@@ -81,11 +81,11 @@ extern void sparc_emit_set_symbolic_const64 (rtx, rtx, rtx);
extern int sparc_splitdi_legitimate (rtx, rtx);
extern int sparc_absnegfloat_split_legitimate (rtx, rtx);
extern const char *output_ubranch (rtx, int, rtx);
extern const char *output_cbranch (rtx, rtx, int, int, int, int, rtx);
extern const char *output_cbranch (rtx, rtx, int, int, int, rtx);
extern const char *output_return (rtx);
extern const char *output_sibcall (rtx, rtx);
extern const char *output_v8plus_shift (rtx *, rtx, const char *);
extern const char *output_v9branch (rtx, rtx, int, int, int, int, int, rtx);
extern const char *output_v9branch (rtx, rtx, int, int, int, int, rtx);
extern void emit_v9_brxx_insn (enum rtx_code, rtx, rtx);
extern void print_operand (FILE *, rtx, int);
extern int mems_ok_for_ldd_peep (rtx, rtx, rtx);
......
......@@ -2517,6 +2517,19 @@ do { \
#define ASM_OUTPUT_IDENT(FILE, NAME) \
fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME);
/* Prettify the assembly. */
extern int sparc_indent_opcode;
#define ASM_OUTPUT_OPCODE(FILE, PTR) \
do { \
if (sparc_indent_opcode) \
{ \
putc (' ', FILE); \
sparc_indent_opcode = 0; \
} \
} while (0)
/* Emit a dtp-relative reference to a TLS variable. */
#ifdef HAVE_AS_TLS
......@@ -2525,8 +2538,8 @@ do { \
#endif
#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
((CHAR) == '#' || (CHAR) == '*' || (CHAR) == '^' \
|| (CHAR) == '(' || (CHAR) == '_' || (CHAR) == '&')
((CHAR) == '#' || (CHAR) == '*' || (CHAR) == '(' \
|| (CHAR) == ')' || (CHAR) == '_' || (CHAR) == '&')
/* Print operand X (an rtx) in assembler syntax to file FILE.
CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
......
......@@ -1549,7 +1549,7 @@
{
return output_cbranch (operands[0], operands[1], 1, 0,
final_sequence && INSN_ANNULLED_BRANCH_P (insn),
! final_sequence, insn);
insn);
}
[(set_attr "type" "branch")
(set_attr "branch_type" "icc")])
......@@ -1565,7 +1565,7 @@
{
return output_cbranch (operands[0], operands[1], 1, 1,
final_sequence && INSN_ANNULLED_BRANCH_P (insn),
! final_sequence, insn);
insn);
}
[(set_attr "type" "branch")
(set_attr "branch_type" "icc")])
......@@ -1582,7 +1582,7 @@
{
return output_cbranch (operands[1], operands[2], 2, 0,
final_sequence && INSN_ANNULLED_BRANCH_P (insn),
! final_sequence, insn);
insn);
}
[(set_attr "type" "branch")
(set_attr "branch_type" "fcc")])
......@@ -1599,7 +1599,7 @@
{
return output_cbranch (operands[1], operands[2], 2, 1,
final_sequence && INSN_ANNULLED_BRANCH_P (insn),
! final_sequence, insn);
insn);
}
[(set_attr "type" "branch")
(set_attr "branch_type" "fcc")])
......@@ -1616,7 +1616,7 @@
{
return output_cbranch (operands[1], operands[2], 2, 0,
final_sequence && INSN_ANNULLED_BRANCH_P (insn),
! final_sequence, insn);
insn);
}
[(set_attr "type" "branch")
(set_attr "branch_type" "fcc")])
......@@ -1633,7 +1633,7 @@
{
return output_cbranch (operands[1], operands[2], 2, 1,
final_sequence && INSN_ANNULLED_BRANCH_P (insn),
! final_sequence, insn);
insn);
}
[(set_attr "type" "branch")
(set_attr "branch_type" "fcc")])
......@@ -1655,7 +1655,7 @@
{
return output_v9branch (operands[0], operands[2], 1, 2, 0,
final_sequence && INSN_ANNULLED_BRANCH_P (insn),
! final_sequence, insn);
insn);
}
[(set_attr "type" "branch")
(set_attr "branch_type" "reg")])
......@@ -1672,7 +1672,7 @@
{
return output_v9branch (operands[0], operands[2], 1, 2, 1,
final_sequence && INSN_ANNULLED_BRANCH_P (insn),
! final_sequence, insn);
insn);
}
[(set_attr "type" "branch")
(set_attr "branch_type" "reg")])
......
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