* 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
+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.
UDItype_x ll;
};
+UDItype_x __fixunsdfdi (double a1);
/* convert double to unsigned int */
UDItype_x
UDItype_x ll;
};
+DItype_x __fixdfdi (double a1);
+
/* convert double to int */
DItype_x
__fixdfdi (double a1)
USItype_x l;
};
+UDItype_x __fixunssfdi (float a1);
+
/* convert float to unsigned int */
UDItype_x
__fixunssfdi (float a1)
USItype_x l;
};
+DItype_x __fixsfdi (float a1);
+
/* convert double to int */
DItype_x
__fixsfdi (float a1)
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));
{
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;
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;
{
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;
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;
}
+/* 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. */
{
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. */
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])
#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)? \
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