This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PUSH and POP next to first/last register use
- From: James E Wilson <wilson at specifixinc dot com>
- To: Sami Khawam <S dot Khawam at ee dot ed dot ac dot uk>
- Cc: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>, gcc at gcc dot gnu dot org
- Date: Wed, 09 Feb 2005 19:25:58 -0800
- Subject: Re: PUSH and POP next to first/last register use
- References: <41F7813C.3080907@ee.ed.ac.uk> <41F7A3A5.2040105@lu.unisi.ch> <420A4CE1.8050707@ee.ed.ac.uk>
Sami Khawam wrote:
Acctually I do not need to worry about the order in which the pushes and
pops are done, as these would be taken care of in the special assembler
I am using.
If you have only a single stack, then using it for two different
purposes will not work. You will get conflicts. The compiler uses the
stack for allocation (alloca, variable length arrays), and for a
push/pop target, the compiler is probably also using the stack for
parameter passing. If you try to emit your own push/pop instructions
for register saving, the result will be an unworkable mess unless the
two are closely coordinated to avoid conflicts. This means that you
probably can't get this working with a simple hack.
internal compiler error: in final, at final.c:1569
I suggest you look at line 1569 in the file final.c and try to figure
out what is wrong. A simple file/lineno pair is not always useful to
us, as line numbers change frequently. You didn't mention the gcc
version, but if I assume you are using something from mainline, there is
a gcc_assert there that you may have hit, with a helpful comment.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com