fixdfdi.h (__fixunsdfdi, __fixdfdi): Add prototypes.
authorUlrich Weigand <uweigand@de.ibm.com>
Mon, 21 Oct 2002 19:41:11 +0000 (19:41 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Mon, 21 Oct 2002 19:41:11 +0000 (19:41 +0000)
* config/s390/fixdfdi.h (__fixunsdfdi, __fixdfdi): Add prototypes.
(__fixunssfdi, __fixsfdi): Likewise.
* config/s390/s390.c (s390_single_hi): Initialize 'value'.
(s390_single_qi): Likewise.
(s390_emit_epilogue): Initialize 'offset'.  Remove signed vs.
unsigned comparison warning.
(s390_return_addr_rtx): New function.
* config/s390/s390-protos.h (s390_return_addr_rtx): Declare it.
* config/s390/s390.h (RETURN_ADDR_RTX): Use it.
(HARD_REGNO_MODE_OK): Rewrite condition to silence warnings.

From-SVN: r58379

gcc/ChangeLog
gcc/config/s390/fixdfdi.h
gcc/config/s390/s390-protos.h
gcc/config/s390/s390.c
gcc/config/s390/s390.h

index 61bf5aad99a5fd4f5140cefadf775c830adc32ef..d72b90e7d623a03214137344644edbd55a0c8662 100644 (file)
@@ -1,3 +1,16 @@
+2002-10-21  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * config/s390/fixdfdi.h (__fixunsdfdi, __fixdfdi): Add prototypes.
+       (__fixunssfdi, __fixsfdi): Likewise.
+       * config/s390/s390.c (s390_single_hi): Initialize 'value'.
+       (s390_single_qi): Likewise.
+       (s390_emit_epilogue): Initialize 'offset'.  Remove signed vs.
+       unsigned comparison warning.
+       (s390_return_addr_rtx): New function.
+       * config/s390/s390-protos.h (s390_return_addr_rtx): Declare it.
+       * config/s390/s390.h (RETURN_ADDR_RTX): Use it.
+       (HARD_REGNO_MODE_OK): Rewrite condition to silence warnings.
+
 2002-10-21  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * config/s390/s390.c (s390_output_mi_vcall_thunk): New function.
index 4f1fb352f1b1c061c7b10eea09b96a70e58d951e..1f82a9c7a2cd353f8375735ba5aaf294923e7d2d 100644 (file)
@@ -43,6 +43,7 @@ union double_long {
     UDItype_x ll;
 };
 
+UDItype_x __fixunsdfdi (double a1);
 
 /* convert double to unsigned int */
 UDItype_x
@@ -114,6 +115,8 @@ union double_long {
     UDItype_x ll;
 };
 
+DItype_x __fixdfdi (double a1);
+
 /* convert double to int */
 DItype_x
 __fixdfdi (double a1)
@@ -184,6 +187,8 @@ union float_long
     USItype_x l;
   };
 
+UDItype_x __fixunssfdi (float a1);
+
 /* convert float to unsigned int */
 UDItype_x
 __fixunssfdi (float a1)
@@ -250,6 +255,8 @@ union float_long
     USItype_x l;
   };
 
+DItype_x __fixsfdi (float a1);
+
 /* convert double to int */
 DItype_x
 __fixsfdi (float a1)
index 09822bcabc370369f61d1064ba2d96c1e674fff9..4def9452ef8c4a8dceff3fb33eb2e36f60f54855 100644 (file)
@@ -66,6 +66,7 @@ extern void s390_load_address PARAMS ((rtx, rtx));
 extern void s390_expand_movstr PARAMS ((rtx, rtx, rtx));
 extern void s390_expand_clrstr PARAMS ((rtx, rtx));
 extern void s390_expand_cmpstr PARAMS ((rtx, rtx, rtx, rtx));
+extern rtx s390_return_addr_rtx PARAMS ((int, rtx));
 
 extern void s390_output_symbolic_const PARAMS ((FILE *, rtx));
 extern void print_operand_address PARAMS ((FILE *, rtx));
index f5009f20727c126ae8d1cd5cd88470c9b2518aa5..4d4e325897b4f3c682be4f37fca476055d9b1eb5 100644 (file)
@@ -605,7 +605,7 @@ s390_single_hi (op, mode, def)
 {
   if (GET_CODE (op) == CONST_INT)
     {
-      unsigned HOST_WIDE_INT value;
+      unsigned HOST_WIDE_INT value = 0;
       int n_parts = GET_MODE_SIZE (mode) / 2;
       int i, part = -1;
 
@@ -631,7 +631,7 @@ s390_single_hi (op, mode, def)
   else if (GET_CODE (op) == CONST_DOUBLE
            && GET_MODE (op) == VOIDmode)
     {
-      unsigned HOST_WIDE_INT value;
+      unsigned HOST_WIDE_INT value = 0;
       int n_parts = GET_MODE_SIZE (mode) / 2;
       int i, part = -1;
 
@@ -708,7 +708,7 @@ s390_single_qi (op, mode, def)
 {
   if (GET_CODE (op) == CONST_INT)
     {
-      unsigned HOST_WIDE_INT value;
+      unsigned HOST_WIDE_INT value = 0;
       int n_parts = GET_MODE_SIZE (mode);
       int i, part = -1;
 
@@ -734,7 +734,7 @@ s390_single_qi (op, mode, def)
   else if (GET_CODE (op) == CONST_DOUBLE
            && GET_MODE (op) == VOIDmode)
     {
-      unsigned HOST_WIDE_INT value;
+      unsigned HOST_WIDE_INT value = 0;
       int n_parts = GET_MODE_SIZE (mode);
       int i, part = -1;
 
@@ -4370,6 +4370,31 @@ s390_machine_dependent_reorg (first)
 }
 
 
+/* Return an RTL expression representing the value of the return address
+   for the frame COUNT steps up from the current frame.  FRAME is the
+   frame pointer of that frame.  */
+
+rtx
+s390_return_addr_rtx (count, frame)
+     int count;
+     rtx frame;
+{
+  rtx addr;
+
+  /* For the current frame, we use the initial value of RETURN_REGNUM.
+     This works both in leaf and non-leaf functions.  */
+
+  if (count == 0)
+    return get_hard_reg_initial_val (Pmode, RETURN_REGNUM);
+
+  /* For frames farther back, we read the stack slot where the
+     corresponding RETURN_REGNUM value was saved.  */
+
+  addr = plus_constant (frame, RETURN_REGNUM * UNITS_PER_WORD);
+  addr = memory_address (Pmode, addr);
+  return gen_rtx_MEM (Pmode, addr);
+} 
+
 /* Find first call clobbered register unsused in a function.
    This could be used as base register in a leaf function
    or for holding the return address before epilogue.  */
@@ -4794,7 +4819,7 @@ s390_emit_epilogue ()
 {
   struct s390_frame frame;
   rtx frame_pointer, return_reg;
-  int area_bottom, area_top, offset;
+  int area_bottom, area_top, offset = 0;
   rtvec p;
 
   /* Compute frame_info.  */
@@ -4916,7 +4941,7 @@ s390_emit_epilogue ()
          if (i == STACK_POINTER_REGNUM 
               || i == RETURN_REGNUM
               || i == BASE_REGISTER 
-              || (flag_pic && i == PIC_OFFSET_TABLE_REGNUM))
+              || (flag_pic && i == (int)PIC_OFFSET_TABLE_REGNUM))
            continue;
 
          if (global_regs[i])
index 37c6ade1f532fa6011c7bbcd5ad7ef19d1a92db4..aae46cf618cfbd46892431a577e22262d680472b 100644 (file)
@@ -370,9 +370,9 @@ do                                                          \
 
 #define HARD_REGNO_MODE_OK(REGNO, MODE)                             \
   (FLOAT_REGNO_P(REGNO)?                                            \
-   (GET_MODE_CLASS(MODE) == MODE_FLOAT ||                           \
-    GET_MODE_CLASS(MODE) == MODE_COMPLEX_FLOAT ||                   \
-    (MODE) == SImode || (MODE) == DImode) :                         \
+   ((MODE) == SImode || (MODE) == DImode ||                         \
+    GET_MODE_CLASS(MODE) == MODE_FLOAT ||                           \
+    GET_MODE_CLASS(MODE) == MODE_COMPLEX_FLOAT) :                   \
    INT_REGNO_P(REGNO)?                                              \
     (HARD_REGNO_NREGS(REGNO, MODE) == 1 || !((REGNO) & 1)) :        \
    CC_REGNO_P(REGNO)?                                               \
@@ -599,11 +599,7 @@ extern const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER]; /* smalled clas
    plus_constant (arg_pointer_rtx, -STACK_POINTER_OFFSET))
      
 #define RETURN_ADDR_RTX(COUNT, FRAME)                                          \
-  ((COUNT) == 0 ? get_hard_reg_initial_val (Pmode, RETURN_REGNUM) :            \
-   gen_rtx_MEM (Pmode,                                                         \
-                memory_address (Pmode,                                                 \
-                                plus_constant (DYNAMIC_CHAIN_ADDRESS ((FRAME)),        \
-                                               RETURN_REGNUM * UNITS_PER_WORD))))
+  s390_return_addr_rtx ((COUNT), DYNAMIC_CHAIN_ADDRESS ((FRAME)))
 
 /* The following macros will turn on dwarf2 exception hndling
    Other code location for this exception handling are