This is the mail archive of the
mailing list for the GCC project.
Previously applied patch- force PR to be live, causes problem in gcc-3.0.2 for SH target
- From: "anitak" <anitak at kpit dot com>
- To: <gcc-bugs at gcc dot gnu dot org>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 11 Dec 2001 14:10:36 +0530
- Subject: Previously applied patch- force PR to be live, causes problem in gcc-3.0.2 for SH target
The following patch is causing the problem decribed below.
* sh.c (initial_elimination_offset): When seeing
RETURN_ADDRESS_POINTER_REGNUM, force pr to be live.
This causes the PR to be saved on stack and restored even though there is
no function call from within a function. So if there is a function
which has memory initialization in it, called from a assembly file,as it
stores the PR
on to stack and stack is not yet available it causes an error.
e.g. for the following small program and generated assembly code is :
extern void hardware_initialize(void);
.ident "GCC: (GNU) 3.0.2"
As this feature was not there in gcc-3.0.1 it works fine for the c function
called from assembly.
Is there any specific reason for saving and restoring PR to/from stack? Or
could it be reversed?
Any help will be appreciated.
Free download and free European support of GNU tool
chain (GNUSH v0101) for Hitachi's SH Series
Read more at http://www.kpit.com/products/support.htm