This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

S/390: Minor literal pool simplification


Hello,

this further simplifies the literal pool code, possible after the 
recent changes.

Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux.

Bye,
Ulrich

ChangeLog:

	* config/s390/s390.c (emit_prologue): Don't check literal pool size.
	* config/s390/s390.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Call 
	s390_output_pool_entry.


Index: gcc/config/s390/s390.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.c,v
retrieving revision 1.109
diff -c -p -r1.109 s390.c
*** gcc/config/s390/s390.c	23 Aug 2003 15:39:18 -0000	1.109
--- gcc/config/s390/s390.c	26 Aug 2003 15:06:18 -0000
*************** s390_emit_prologue (void)
*** 5316,5322 ****
       See below for why TPF must use the register 1.  */
  
    if (!current_function_is_leaf
-       && get_pool_size () < S390_POOL_CHUNK_MAX / 2
        && !TARGET_TPF)
      temp_reg = gen_rtx_REG (Pmode, RETURN_REGNUM);
    else
--- 5316,5321 ----
Index: gcc/config/s390/s390.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.h,v
retrieving revision 1.82
diff -c -p -r1.82 s390.h
*** gcc/config/s390/s390.h	23 Aug 2003 19:41:47 -0000	1.82
--- gcc/config/s390/s390.h	26 Aug 2003 15:06:19 -0000
*************** extern int s390_nr_constants;
*** 1034,1072 ****
  #define ASM_OUTPUT_SPECIAL_POOL_ENTRY(FILE, EXP, MODE, ALIGN, LABELNO, WIN) \
  {									    \
    fprintf (FILE, ".LC%d:\n", LABELNO);					    \
! 									    \
!   /* Output the value of the constant itself.  */			    \
!   switch (GET_MODE_CLASS (MODE))					    \
!     {									    \
!     case MODE_FLOAT:							    \
!       if (GET_CODE (EXP) != CONST_DOUBLE)				    \
! 	abort ();							    \
! 									    \
!       REAL_VALUE_FROM_CONST_DOUBLE (r, EXP);				    \
!       assemble_real (r, MODE, ALIGN);					    \
!       break;								    \
! 									    \
!     case MODE_INT:							    \
!     case MODE_PARTIAL_INT:						    \
!       if (GET_CODE (EXP) == CONST					    \
! 	  || GET_CODE (EXP) == SYMBOL_REF				    \
! 	  || GET_CODE (EXP) == LABEL_REF)				    \
!         {								    \
! 	  fputs (integer_asm_op (UNITS_PER_WORD, TRUE), FILE);		    \
!           s390_output_symbolic_const (FILE, EXP);			    \
!           fputc ('\n', (FILE));						    \
! 	}								    \
!       else								    \
! 	{								    \
! 	  assemble_integer (EXP, GET_MODE_SIZE (MODE), ALIGN, 1);	    \
! 	  if (GET_MODE_SIZE (MODE) == 1)				    \
! 	    ASM_OUTPUT_SKIP ((FILE), (unsigned HOST_WIDE_INT)1);	    \
! 	}								    \
!       break;								    \
! 									    \
!     default:								    \
!       abort ();								    \
!     }									    \
    goto WIN;								    \
  }
  
--- 1034,1042 ----
  #define ASM_OUTPUT_SPECIAL_POOL_ENTRY(FILE, EXP, MODE, ALIGN, LABELNO, WIN) \
  {									    \
    fprintf (FILE, ".LC%d:\n", LABELNO);					    \
!   s390_output_pool_entry (FILE, EXP, MODE, ALIGN);			    \
!   if (GET_MODE_SIZE (MODE) == 1)					    \
!     ASM_OUTPUT_SKIP ((FILE), (unsigned HOST_WIDE_INT)1);		    \
    goto WIN;								    \
  }
  
-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]