Commit 38899e29 by Eric Christopher Committed by Eric Christopher

s390.h (CONDITIONAL_REGISTER_USAGE): Move body...

2004-05-03  Eric Christopher  <echristo@redhat.com>

	* config/s390/s390.h (CONDITIONAL_REGISTER_USAGE): Move body...
	* config/s390/s390.c (s390_conditional_register_usage): ...here.
	* config/s390/s390-protos.h: Prototype.

From-SVN: r81465
parent 3ccd700f
2004-05-03 Eric Christopher <echristo@redhat.com>
* config/s390/s390.h (CONDITIONAL_REGISTER_USAGE): Move body...
* config/s390/s390.c (s390_conditional_register_usage): ...here.
* config/s390/s390-protos.h: Prototype.
2004-05-03 Joe Buck <jbuck@welsh-buck.org> 2004-05-03 Joe Buck <jbuck@welsh-buck.org>
* cppfiles.c (pchf_adder): Eliminate use of |= in d->have_once_only * cppfiles.c (pchf_adder): Eliminate use of |= in d->have_once_only
......
...@@ -28,6 +28,7 @@ extern void s390_load_got (int); ...@@ -28,6 +28,7 @@ extern void s390_load_got (int);
extern void s390_emit_prologue (void); extern void s390_emit_prologue (void);
extern void s390_emit_epilogue (bool); extern void s390_emit_epilogue (bool);
extern void s390_function_profiler (FILE *, int); extern void s390_function_profiler (FILE *, int);
extern void s390_conditional_register_usage (void);
#ifdef RTX_CODE #ifdef RTX_CODE
extern int s390_extra_constraint_str (rtx, int, const char *); extern int s390_extra_constraint_str (rtx, int, const char *);
......
...@@ -7185,4 +7185,34 @@ s390_emit_call (rtx addr_location, rtx tls_call, rtx result_reg, ...@@ -7185,4 +7185,34 @@ s390_emit_call (rtx addr_location, rtx tls_call, rtx result_reg,
return insn; return insn;
} }
/* Implement CONDITIONAL_REGISTER_USAGE. */
void
s390_conditional_register_usage (void)
{
int i;
if (flag_pic)
{
fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;
}
if (TARGET_CPU_ZARCH)
{
fixed_regs[RETURN_REGNUM] = 0;
call_used_regs[RETURN_REGNUM] = 0;
}
if (TARGET_64BIT)
{
for (i = 24; i < 32; i++)
call_used_regs[i] = call_really_used_regs[i] = 0;
}
else
{
for (i = 18; i < 20; i++)
call_used_regs[i] = call_really_used_regs[i] = 0;
}
}
#include "gt-s390.h" #include "gt-s390.h"
...@@ -351,32 +351,7 @@ if (INTEGRAL_MODE_P (MODE) && \ ...@@ -351,32 +351,7 @@ if (INTEGRAL_MODE_P (MODE) && \
1, 1, 1, 1, \ 1, 1, 1, 1, \
1, 1, 1 } 1, 1, 1 }
#define CONDITIONAL_REGISTER_USAGE \ #define CONDITIONAL_REGISTER_USAGE s390_conditional_register_usage ()
do \
{ \
int i; \
\
if (flag_pic) \
{ \
fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
} \
if (TARGET_CPU_ZARCH) \
{ \
fixed_regs[RETURN_REGNUM] = 0; \
call_used_regs[RETURN_REGNUM] = 0; \
} \
if (TARGET_64BIT) \
{ \
for (i = 24; i < 32; i++) \
call_used_regs[i] = call_really_used_regs[i] = 0; \
} \
else \
{ \
for (i = 18; i < 20; i++) \
call_used_regs[i] = call_really_used_regs[i] = 0; \
} \
} while (0)
/* Preferred register allocation order. */ /* Preferred register allocation order. */
#define REG_ALLOC_ORDER \ #define REG_ALLOC_ORDER \
......
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