return 0;
}
-/* Output symbolic constant X in assembler syntax to
- stdio stream FILE. */
+/* Output machine-dependent UNSPECs occurring in address constant X
+ in assembler syntax to stdio stream FILE. Returns true if the
+ constant X could be recognized, false otherwise. */
-void
-s390_output_symbolic_const (FILE *file, rtx x)
+bool
+s390_output_addr_const_extra (FILE *file, rtx x)
{
- switch (GET_CODE (x))
- {
- case CONST:
- case ZERO_EXTEND:
- case SIGN_EXTEND:
- s390_output_symbolic_const (file, XEXP (x, 0));
- break;
-
- case PLUS:
- s390_output_symbolic_const (file, XEXP (x, 0));
- fprintf (file, "+");
- s390_output_symbolic_const (file, XEXP (x, 1));
- break;
-
- case MINUS:
- s390_output_symbolic_const (file, XEXP (x, 0));
- fprintf (file, "-");
- s390_output_symbolic_const (file, XEXP (x, 1));
- break;
-
- case CONST_INT:
- case LABEL_REF:
- case CODE_LABEL:
- case SYMBOL_REF:
- output_addr_const (file, x);
- break;
-
- case UNSPEC:
- if (XVECLEN (x, 0) != 1)
- output_operand_lossage ("invalid UNSPEC as operand (1)");
- switch (XINT (x, 1))
- {
- case UNSPEC_GOTENT:
- s390_output_symbolic_const (file, XVECEXP (x, 0, 0));
- fprintf (file, "@GOTENT");
- break;
- case UNSPEC_GOT:
- s390_output_symbolic_const (file, XVECEXP (x, 0, 0));
- fprintf (file, "@GOT");
- break;
- case UNSPEC_GOTOFF:
- s390_output_symbolic_const (file, XVECEXP (x, 0, 0));
- fprintf (file, "@GOTOFF");
- break;
- case UNSPEC_PLT:
- s390_output_symbolic_const (file, XVECEXP (x, 0, 0));
- fprintf (file, "@PLT");
- 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;
+ if (GET_CODE (x) == UNSPEC && XVECLEN (x, 0) == 1)
+ switch (XINT (x, 1))
+ {
+ case UNSPEC_GOTENT:
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fprintf (file, "@GOTENT");
+ return true;
+ case UNSPEC_GOT:
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fprintf (file, "@GOT");
+ return true;
+ case UNSPEC_GOTOFF:
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fprintf (file, "@GOTOFF");
+ return true;
+ case UNSPEC_PLT:
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fprintf (file, "@PLT");
+ return true;
+ case UNSPEC_PLTOFF:
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fprintf (file, "@PLTOFF");
+ return true;
+ case UNSPEC_TLSGD:
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fprintf (file, "@TLSGD");
+ return true;
+ case UNSPEC_TLSLDM:
+ assemble_name (file, get_some_local_dynamic_name ());
+ fprintf (file, "@TLSLDM");
+ return true;
+ case UNSPEC_DTPOFF:
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fprintf (file, "@DTPOFF");
+ return true;
+ case UNSPEC_NTPOFF:
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fprintf (file, "@NTPOFF");
+ return true;
+ case UNSPEC_GOTNTPOFF:
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fprintf (file, "@GOTNTPOFF");
+ return true;
+ case UNSPEC_INDNTPOFF:
+ output_addr_const (file, XVECEXP (x, 0, 0));
+ fprintf (file, "@INDNTPOFF");
+ return true;
+ }
- default:
- fatal_insn ("UNKNOWN in s390_output_symbolic_const !?", x);
- break;
- }
+ return false;
}
/* Output address operand ADDR in assembler syntax to
output_operand_lossage ("Cannot decompose address.");
if (ad.disp)
- s390_output_symbolic_const (file, ad.disp);
+ output_addr_const (file, ad.disp);
else
fprintf (file, "0");
abort ();
if (ad.disp)
- s390_output_symbolic_const (file, ad.disp);
+ output_addr_const (file, ad.disp);
else
fprintf (file, "0");
}
case CODE_LABEL:
case LABEL_REF:
case SYMBOL_REF:
- s390_output_symbolic_const (file, x);
+ output_addr_const (file, x);
break;
case CONST_INT:
}
-/* Output to FILE the constant pool entry EXP in mode MODE
- with alignment ALIGN. */
+/* Output the constant pool entry EXP in mode MODE with alignment ALIGN. */
void
-s390_output_pool_entry (FILE *file, rtx exp, enum machine_mode mode,
- unsigned int align)
+s390_output_pool_entry (rtx exp, enum machine_mode mode, unsigned int align)
{
REAL_VALUE_TYPE r;
break;
case MODE_INT:
- if (GET_CODE (exp) == CONST
- || 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);
- }
+ assemble_integer (exp, GET_MODE_SIZE (mode), align, 1);
break;
default: