Commit faeb9bb6 by Ulrich Weigand Committed by Ulrich Weigand

s390-protos.h (s390_output_symbolic_const): Remove.

	* config/s390/s390-protos.h (s390_output_symbolic_const): Remove.
	(s390_output_addr_const_extra): Declare.
	(s390_output_pool_entry): Remove FILE * argument.
	* config/s390/s390.c (s390_output_symbolic_const): Remove.
	(s390_output_addr_const_extra): New function.
	(print_operand_address): Call output_addr_const instead of
	s390_output_symbolic_const.
	(print_operand): Likewise.
	(s390_output_pool_entry): Use assemble_integer for symbolic constants.
	Remove FILE * argument.
	* config/s390/s390.h (OUTPUT_ADDR_CONST_EXTRA): Define.
	* config/s390/s390.md ("*pool_entry"): Adapt s390_output_pool_entry
	call.

From-SVN: r77757
parent cfbe3efe
2004-02-13 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390-protos.h (s390_output_symbolic_const): Remove.
(s390_output_addr_const_extra): Declare.
(s390_output_pool_entry): Remove FILE * argument.
* config/s390/s390.c (s390_output_symbolic_const): Remove.
(s390_output_addr_const_extra): New function.
(print_operand_address): Call output_addr_const instead of
s390_output_symbolic_const.
(print_operand): Likewise.
(s390_output_pool_entry): Use assemble_integer for symbolic constants.
Remove FILE * argument.
* config/s390/s390.h (OUTPUT_ADDR_CONST_EXTRA): Define.
* config/s390/s390.md ("*pool_entry"): Adapt s390_output_pool_entry
call.
2004-02-13 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> 2004-02-13 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
* cfgloopanal.c (mark_irreducible_loops): Rewriten. * cfgloopanal.c (mark_irreducible_loops): Rewriten.
......
...@@ -78,12 +78,11 @@ extern void s390_expand_clrstr (rtx, rtx); ...@@ -78,12 +78,11 @@ extern void s390_expand_clrstr (rtx, rtx);
extern void s390_expand_cmpmem (rtx, rtx, rtx, rtx); extern void s390_expand_cmpmem (rtx, rtx, rtx, rtx);
extern rtx s390_return_addr_rtx (int, rtx); extern rtx s390_return_addr_rtx (int, rtx);
extern void s390_output_symbolic_const (FILE *, rtx); extern bool s390_output_addr_const_extra (FILE*, rtx);
extern void print_operand_address (FILE *, rtx); extern void print_operand_address (FILE *, rtx);
extern void print_operand (FILE *, rtx, int); extern void print_operand (FILE *, rtx, int);
extern void s390_output_constant_pool (rtx, rtx); extern void s390_output_constant_pool (rtx, rtx);
extern void s390_output_pool_entry (FILE *, rtx, enum machine_mode, extern void s390_output_pool_entry (rtx, enum machine_mode, unsigned int);
unsigned int);
extern void s390_trampoline_template (FILE *); extern void s390_trampoline_template (FILE *);
extern void s390_initialize_trampoline (rtx, rtx, rtx); extern void s390_initialize_trampoline (rtx, rtx, rtx);
extern rtx s390_gen_rtx_const_DI (int, int); extern rtx s390_gen_rtx_const_DI (int, int);
......
...@@ -3301,98 +3301,63 @@ get_some_local_dynamic_name_1 (rtx *px, void *data ATTRIBUTE_UNUSED) ...@@ -3301,98 +3301,63 @@ get_some_local_dynamic_name_1 (rtx *px, void *data ATTRIBUTE_UNUSED)
return 0; return 0;
} }
/* Output symbolic constant X in assembler syntax to /* Output machine-dependent UNSPECs occurring in address constant X
stdio stream FILE. */ in assembler syntax to stdio stream FILE. Returns true if the
constant X could be recognized, false otherwise. */
void bool
s390_output_symbolic_const (FILE *file, rtx x) s390_output_addr_const_extra (FILE *file, rtx x)
{ {
switch (GET_CODE (x)) if (GET_CODE (x) == UNSPEC && XVECLEN (x, 0) == 1)
{ switch (XINT (x, 1))
case CONST: {
case ZERO_EXTEND: case UNSPEC_GOTENT:
case SIGN_EXTEND: output_addr_const (file, XVECEXP (x, 0, 0));
s390_output_symbolic_const (file, XEXP (x, 0)); fprintf (file, "@GOTENT");
break; return true;
case UNSPEC_GOT:
case PLUS: output_addr_const (file, XVECEXP (x, 0, 0));
s390_output_symbolic_const (file, XEXP (x, 0)); fprintf (file, "@GOT");
fprintf (file, "+"); return true;
s390_output_symbolic_const (file, XEXP (x, 1)); case UNSPEC_GOTOFF:
break; output_addr_const (file, XVECEXP (x, 0, 0));
fprintf (file, "@GOTOFF");
case MINUS: return true;
s390_output_symbolic_const (file, XEXP (x, 0)); case UNSPEC_PLT:
fprintf (file, "-"); output_addr_const (file, XVECEXP (x, 0, 0));
s390_output_symbolic_const (file, XEXP (x, 1)); fprintf (file, "@PLT");
break; return true;
case UNSPEC_PLTOFF:
case CONST_INT: output_addr_const (file, XVECEXP (x, 0, 0));
case LABEL_REF: fprintf (file, "@PLTOFF");
case CODE_LABEL: return true;
case SYMBOL_REF: case UNSPEC_TLSGD:
output_addr_const (file, x); output_addr_const (file, XVECEXP (x, 0, 0));
break; fprintf (file, "@TLSGD");
return true;
case UNSPEC: case UNSPEC_TLSLDM:
if (XVECLEN (x, 0) != 1) assemble_name (file, get_some_local_dynamic_name ());
output_operand_lossage ("invalid UNSPEC as operand (1)"); fprintf (file, "@TLSLDM");
switch (XINT (x, 1)) return true;
{ case UNSPEC_DTPOFF:
case UNSPEC_GOTENT: output_addr_const (file, XVECEXP (x, 0, 0));
s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); fprintf (file, "@DTPOFF");
fprintf (file, "@GOTENT"); return true;
break; case UNSPEC_NTPOFF:
case UNSPEC_GOT: output_addr_const (file, XVECEXP (x, 0, 0));
s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); fprintf (file, "@NTPOFF");
fprintf (file, "@GOT"); return true;
break; case UNSPEC_GOTNTPOFF:
case UNSPEC_GOTOFF: output_addr_const (file, XVECEXP (x, 0, 0));
s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); fprintf (file, "@GOTNTPOFF");
fprintf (file, "@GOTOFF"); return true;
break; case UNSPEC_INDNTPOFF:
case UNSPEC_PLT: output_addr_const (file, XVECEXP (x, 0, 0));
s390_output_symbolic_const (file, XVECEXP (x, 0, 0)); fprintf (file, "@INDNTPOFF");
fprintf (file, "@PLT"); return true;
break; }
case UNSPEC_PLTOFF:
s390_output_symbolic_const (file, XVECEXP (x, 0, 0));
fprintf (file, "@PLTOFF");
break;
case UNSPEC_TLSGD:
s390_output_symbolic_const (file, XVECEXP (x, 0, 0));
fprintf (file, "@TLSGD");
break;
case UNSPEC_TLSLDM:
assemble_name (file, get_some_local_dynamic_name ());
fprintf (file, "@TLSLDM");
break;
case UNSPEC_DTPOFF:
s390_output_symbolic_const (file, XVECEXP (x, 0, 0));
fprintf (file, "@DTPOFF");
break;
case UNSPEC_NTPOFF:
s390_output_symbolic_const (file, XVECEXP (x, 0, 0));
fprintf (file, "@NTPOFF");
break;
case UNSPEC_GOTNTPOFF:
s390_output_symbolic_const (file, XVECEXP (x, 0, 0));
fprintf (file, "@GOTNTPOFF");
break;
case UNSPEC_INDNTPOFF:
s390_output_symbolic_const (file, XVECEXP (x, 0, 0));
fprintf (file, "@INDNTPOFF");
break;
default:
output_operand_lossage ("invalid UNSPEC as operand (2)");
break;
}
break;
default: return false;
fatal_insn ("UNKNOWN in s390_output_symbolic_const !?", x);
break;
}
} }
/* Output address operand ADDR in assembler syntax to /* Output address operand ADDR in assembler syntax to
...@@ -3409,7 +3374,7 @@ print_operand_address (FILE *file, rtx addr) ...@@ -3409,7 +3374,7 @@ print_operand_address (FILE *file, rtx addr)
output_operand_lossage ("Cannot decompose address."); output_operand_lossage ("Cannot decompose address.");
if (ad.disp) if (ad.disp)
s390_output_symbolic_const (file, ad.disp); output_addr_const (file, ad.disp);
else else
fprintf (file, "0"); fprintf (file, "0");
...@@ -3483,7 +3448,7 @@ print_operand (FILE *file, rtx x, int code) ...@@ -3483,7 +3448,7 @@ print_operand (FILE *file, rtx x, int code)
abort (); abort ();
if (ad.disp) if (ad.disp)
s390_output_symbolic_const (file, ad.disp); output_addr_const (file, ad.disp);
else else
fprintf (file, "0"); fprintf (file, "0");
} }
...@@ -3543,7 +3508,7 @@ print_operand (FILE *file, rtx x, int code) ...@@ -3543,7 +3508,7 @@ print_operand (FILE *file, rtx x, int code)
case CODE_LABEL: case CODE_LABEL:
case LABEL_REF: case LABEL_REF:
case SYMBOL_REF: case SYMBOL_REF:
s390_output_symbolic_const (file, x); output_addr_const (file, x);
break; break;
case CONST_INT: case CONST_INT:
...@@ -4915,12 +4880,10 @@ s390_chunkify_cancel (struct constant_pool *pool_list) ...@@ -4915,12 +4880,10 @@ s390_chunkify_cancel (struct constant_pool *pool_list)
} }
/* Output to FILE the constant pool entry EXP in mode MODE /* Output the constant pool entry EXP in mode MODE with alignment ALIGN. */
with alignment ALIGN. */
void void
s390_output_pool_entry (FILE *file, rtx exp, enum machine_mode mode, s390_output_pool_entry (rtx exp, enum machine_mode mode, unsigned int align)
unsigned int align)
{ {
REAL_VALUE_TYPE r; REAL_VALUE_TYPE r;
...@@ -4935,18 +4898,7 @@ s390_output_pool_entry (FILE *file, rtx exp, enum machine_mode mode, ...@@ -4935,18 +4898,7 @@ s390_output_pool_entry (FILE *file, rtx exp, enum machine_mode mode,
break; break;
case MODE_INT: case MODE_INT:
if (GET_CODE (exp) == CONST assemble_integer (exp, GET_MODE_SIZE (mode), align, 1);
|| GET_CODE (exp) == SYMBOL_REF
|| GET_CODE (exp) == LABEL_REF)
{
fputs (integer_asm_op (GET_MODE_SIZE (mode), TRUE), file);
s390_output_symbolic_const (file, exp);
fputc ('\n', file);
}
else
{
assemble_integer (exp, GET_MODE_SIZE (mode), align, 1);
}
break; break;
default: default:
......
...@@ -970,6 +970,13 @@ extern int flag_pic; ...@@ -970,6 +970,13 @@ extern int flag_pic;
#define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE) #define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR) #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)
/* Output machine-dependent UNSPECs in address constants. */
#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL) \
do { \
if (!s390_output_addr_const_extra (FILE, (X))) \
goto FAIL; \
} while (0);
/* Output an element of a case-vector that is absolute. */ /* Output an element of a case-vector that is absolute. */
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
do { \ do { \
......
...@@ -7403,7 +7403,7 @@ ...@@ -7403,7 +7403,7 @@
{ {
enum machine_mode mode = GET_MODE (PATTERN (insn)); enum machine_mode mode = GET_MODE (PATTERN (insn));
unsigned int align = GET_MODE_BITSIZE (mode); unsigned int align = GET_MODE_BITSIZE (mode);
s390_output_pool_entry (asm_out_file, operands[0], mode, align); s390_output_pool_entry (operands[0], mode, align);
return ""; return "";
} }
[(set_attr "op_type" "NN") [(set_attr "op_type" "NN")
......
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