Commit 5d4d885c by Ulrich Weigand Committed by Ulrich Weigand

fixdfdi.h (__fixunsdfdi, __fixdfdi): Add prototypes.

	* 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
parent 22bd2554
2002-10-21 Ulrich Weigand <uweigand@de.ibm.com> 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. * config/s390/s390.c (s390_output_mi_vcall_thunk): New function.
(TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Define target hook. (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Define target hook.
(s390_output_mi_thunk): Remove. (s390_output_mi_thunk): Remove.
......
...@@ -43,6 +43,7 @@ union double_long { ...@@ -43,6 +43,7 @@ union double_long {
UDItype_x ll; UDItype_x ll;
}; };
UDItype_x __fixunsdfdi (double a1);
/* convert double to unsigned int */ /* convert double to unsigned int */
UDItype_x UDItype_x
...@@ -114,6 +115,8 @@ union double_long { ...@@ -114,6 +115,8 @@ union double_long {
UDItype_x ll; UDItype_x ll;
}; };
DItype_x __fixdfdi (double a1);
/* convert double to int */ /* convert double to int */
DItype_x DItype_x
__fixdfdi (double a1) __fixdfdi (double a1)
...@@ -184,6 +187,8 @@ union float_long ...@@ -184,6 +187,8 @@ union float_long
USItype_x l; USItype_x l;
}; };
UDItype_x __fixunssfdi (float a1);
/* convert float to unsigned int */ /* convert float to unsigned int */
UDItype_x UDItype_x
__fixunssfdi (float a1) __fixunssfdi (float a1)
...@@ -250,6 +255,8 @@ union float_long ...@@ -250,6 +255,8 @@ union float_long
USItype_x l; USItype_x l;
}; };
DItype_x __fixsfdi (float a1);
/* convert double to int */ /* convert double to int */
DItype_x DItype_x
__fixsfdi (float a1) __fixsfdi (float a1)
......
...@@ -66,6 +66,7 @@ extern void s390_load_address PARAMS ((rtx, rtx)); ...@@ -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_movstr PARAMS ((rtx, rtx, rtx));
extern void s390_expand_clrstr PARAMS ((rtx, rtx)); extern void s390_expand_clrstr PARAMS ((rtx, rtx));
extern void s390_expand_cmpstr PARAMS ((rtx, rtx, 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 s390_output_symbolic_const PARAMS ((FILE *, rtx));
extern void print_operand_address PARAMS ((FILE *, rtx)); extern void print_operand_address PARAMS ((FILE *, rtx));
......
...@@ -605,7 +605,7 @@ s390_single_hi (op, mode, def) ...@@ -605,7 +605,7 @@ s390_single_hi (op, mode, def)
{ {
if (GET_CODE (op) == CONST_INT) 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 n_parts = GET_MODE_SIZE (mode) / 2;
int i, part = -1; int i, part = -1;
...@@ -631,7 +631,7 @@ s390_single_hi (op, mode, def) ...@@ -631,7 +631,7 @@ s390_single_hi (op, mode, def)
else if (GET_CODE (op) == CONST_DOUBLE else if (GET_CODE (op) == CONST_DOUBLE
&& GET_MODE (op) == VOIDmode) && GET_MODE (op) == VOIDmode)
{ {
unsigned HOST_WIDE_INT value; unsigned HOST_WIDE_INT value = 0;
int n_parts = GET_MODE_SIZE (mode) / 2; int n_parts = GET_MODE_SIZE (mode) / 2;
int i, part = -1; int i, part = -1;
...@@ -708,7 +708,7 @@ s390_single_qi (op, mode, def) ...@@ -708,7 +708,7 @@ s390_single_qi (op, mode, def)
{ {
if (GET_CODE (op) == CONST_INT) 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 n_parts = GET_MODE_SIZE (mode);
int i, part = -1; int i, part = -1;
...@@ -734,7 +734,7 @@ s390_single_qi (op, mode, def) ...@@ -734,7 +734,7 @@ s390_single_qi (op, mode, def)
else if (GET_CODE (op) == CONST_DOUBLE else if (GET_CODE (op) == CONST_DOUBLE
&& GET_MODE (op) == VOIDmode) && GET_MODE (op) == VOIDmode)
{ {
unsigned HOST_WIDE_INT value; unsigned HOST_WIDE_INT value = 0;
int n_parts = GET_MODE_SIZE (mode); int n_parts = GET_MODE_SIZE (mode);
int i, part = -1; int i, part = -1;
...@@ -4370,6 +4370,31 @@ s390_machine_dependent_reorg (first) ...@@ -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. /* Find first call clobbered register unsused in a function.
This could be used as base register in a leaf function This could be used as base register in a leaf function
or for holding the return address before epilogue. */ or for holding the return address before epilogue. */
...@@ -4794,7 +4819,7 @@ s390_emit_epilogue () ...@@ -4794,7 +4819,7 @@ s390_emit_epilogue ()
{ {
struct s390_frame frame; struct s390_frame frame;
rtx frame_pointer, return_reg; rtx frame_pointer, return_reg;
int area_bottom, area_top, offset; int area_bottom, area_top, offset = 0;
rtvec p; rtvec p;
/* Compute frame_info. */ /* Compute frame_info. */
...@@ -4916,7 +4941,7 @@ s390_emit_epilogue () ...@@ -4916,7 +4941,7 @@ s390_emit_epilogue ()
if (i == STACK_POINTER_REGNUM if (i == STACK_POINTER_REGNUM
|| i == RETURN_REGNUM || i == RETURN_REGNUM
|| i == BASE_REGISTER || i == BASE_REGISTER
|| (flag_pic && i == PIC_OFFSET_TABLE_REGNUM)) || (flag_pic && i == (int)PIC_OFFSET_TABLE_REGNUM))
continue; continue;
if (global_regs[i]) if (global_regs[i])
......
...@@ -370,9 +370,9 @@ do \ ...@@ -370,9 +370,9 @@ do \
#define HARD_REGNO_MODE_OK(REGNO, MODE) \ #define HARD_REGNO_MODE_OK(REGNO, MODE) \
(FLOAT_REGNO_P(REGNO)? \ (FLOAT_REGNO_P(REGNO)? \
(GET_MODE_CLASS(MODE) == MODE_FLOAT || \ ((MODE) == SImode || (MODE) == DImode || \
GET_MODE_CLASS(MODE) == MODE_COMPLEX_FLOAT || \ GET_MODE_CLASS(MODE) == MODE_FLOAT || \
(MODE) == SImode || (MODE) == DImode) : \ GET_MODE_CLASS(MODE) == MODE_COMPLEX_FLOAT) : \
INT_REGNO_P(REGNO)? \ INT_REGNO_P(REGNO)? \
(HARD_REGNO_NREGS(REGNO, MODE) == 1 || !((REGNO) & 1)) : \ (HARD_REGNO_NREGS(REGNO, MODE) == 1 || !((REGNO) & 1)) : \
CC_REGNO_P(REGNO)? \ CC_REGNO_P(REGNO)? \
...@@ -599,11 +599,7 @@ extern const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER]; /* smalled clas ...@@ -599,11 +599,7 @@ extern const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER]; /* smalled clas
plus_constant (arg_pointer_rtx, -STACK_POINTER_OFFSET)) plus_constant (arg_pointer_rtx, -STACK_POINTER_OFFSET))
#define RETURN_ADDR_RTX(COUNT, FRAME) \ #define RETURN_ADDR_RTX(COUNT, FRAME) \
((COUNT) == 0 ? get_hard_reg_initial_val (Pmode, RETURN_REGNUM) : \ s390_return_addr_rtx ((COUNT), DYNAMIC_CHAIN_ADDRESS ((FRAME)))
gen_rtx_MEM (Pmode, \
memory_address (Pmode, \
plus_constant (DYNAMIC_CHAIN_ADDRESS ((FRAME)), \
RETURN_REGNUM * UNITS_PER_WORD))))
/* The following macros will turn on dwarf2 exception hndling /* The following macros will turn on dwarf2 exception hndling
Other code location for this exception handling are Other code location for this exception handling are
......
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