re PR target/6542 (Internal compiler error when building libgcc for sparc-elf)

PR target/6542
	* config/sparc/sparc.h (leaf_reg_remap): Remove const.
	(CONDITIONAL_REGISTER_USAGE): For TARGET_FLAT make
	fill leaf_reg_remap with identity.
	* config/sparc/sparc.c (leaf_reg_remap): Remove const.

	* gcc.dg/20020503-1.c: New test.

From-SVN: r53127
This commit is contained in:
Jakub Jelinek 2002-05-03 22:46:23 +02:00 committed by Jakub Jelinek
parent db007e7a8c
commit 1c44af1ef2
4 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2002-05-03 Jakub Jelinek <jakub@redhat.com>
PR target/6542
* config/sparc/sparc.h (leaf_reg_remap): Remove const.
(CONDITIONAL_REGISTER_USAGE): For TARGET_FLAT make
fill leaf_reg_remap with identity.
* config/sparc/sparc.c (leaf_reg_remap): Remove const.
2002-05-03 Jakub Jelinek <jakub@redhat.com>
PR target/6522

View File

@ -85,7 +85,7 @@ bool sparc_emitting_epilogue;
/* Vector to say how input registers are mapped to output registers.
HARD_FRAME_POINTER_REGNUM cannot be remapped by this function to
eliminate it. You must use -fomit-frame-pointer to get that. */
const char leaf_reg_remap[] =
char leaf_reg_remap[] =
{ 0, 1, 2, 3, 4, 5, 6, 7,
-1, -1, -1, -1, -1, -1, 14, -1,
-1, -1, -1, -1, -1, -1, -1, -1,

View File

@ -1017,12 +1017,16 @@ do \
fixed_regs[4] = 0; \
if (TARGET_FLAT) \
{ \
int regno; \
/* Let the compiler believe the frame pointer is still \
%fp, but output it as %i7. */ \
fixed_regs[31] = 1; \
reg_names[HARD_FRAME_POINTER_REGNUM] = "%i7"; \
/* Disable leaf functions */ \
memset (sparc_leaf_regs, 0, FIRST_PSEUDO_REGISTER); \
/* Make LEAF_REG_REMAP a noop. */ \
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) \
leaf_reg_remap [regno] = regno; \
} \
} \
while (0)
@ -1319,7 +1323,7 @@ extern enum reg_class sparc_regno_reg_class[FIRST_PSEUDO_REGISTER];
extern char sparc_leaf_regs[];
#define LEAF_REGISTERS sparc_leaf_regs
extern const char leaf_reg_remap[];
extern char leaf_reg_remap[];
#define LEAF_REG_REMAP(REGNO) (leaf_reg_remap[REGNO])
/* The class value for index registers, and the one for base regs. */

View File

@ -1,5 +1,7 @@
2002-05-03 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/20020503-1.c: New test.
* gcc.dg/cpp/cmdlne-dM-M.c: New test.
* gcc.dg/cpp/cmdlne-dD-M.c: New test.
* gcc.dg/cpp/cmdlne-dN-M.c: New test.