aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2002-10-21 19:41:11 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2002-10-21 19:41:11 +0000
commit5d4d885ca6321901051b3374817ff46249f273f1 (patch)
tree74c245ccc0b95630fdf5b63be52ab82600de51fc /gcc
parent22bd25548a593b0a2082cfe501d6436b86c55c38 (diff)
downloadgcc-5d4d885ca6321901051b3374817ff46249f273f1.zip
gcc-5d4d885ca6321901051b3374817ff46249f273f1.tar.gz
gcc-5d4d885ca6321901051b3374817ff46249f273f1.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/config/s390/fixdfdi.h7
-rw-r--r--gcc/config/s390/s390-protos.h1
-rw-r--r--gcc/config/s390/s390.c37
-rw-r--r--gcc/config/s390/s390.h12
5 files changed, 56 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 61bf5aa..d72b90e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,18 @@
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.
(TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Define target hook.
(s390_output_mi_thunk): Remove.
diff --git a/gcc/config/s390/fixdfdi.h b/gcc/config/s390/fixdfdi.h
index 4f1fb35..1f82a9c 100644
--- a/gcc/config/s390/fixdfdi.h
+++ b/gcc/config/s390/fixdfdi.h
@@ -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)
diff --git a/gcc/config/s390/s390-protos.h b/gcc/config/s390/s390-protos.h
index 09822bc..4def945 100644
--- a/gcc/config/s390/s390-protos.h
+++ b/gcc/config/s390/s390-protos.h
@@ -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));
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index f5009f2..4d4e325 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -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])
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 37c6ade..aae46cf 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -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