* Doc for -fcall-used-REG and -fcall-saved-REG
@ 1998-10-13 19:22 Gavin Romig-Koch
1998-10-14 8:03 ` Nick Ing-Simmons
1998-10-14 14:44 ` Jeffrey A Law
0 siblings, 2 replies; 3+ messages in thread
From: Gavin Romig-Koch @ 1998-10-13 19:22 UTC (permalink / raw)
To: egcs
From invoke.texi, for -fcall-used-REG and -fcall-saved-REG:
Use of this flag for a register that has a fixed pervasive role in the
machine's execution model, such as the stack pointer or frame pointer,
will produce disastrous results.
I'm writing a patch to have the compiler emit an error message
if these options are used on the frame pointer or the stack pointer,
and was going to update the doc to reflect this, so some thing
like:
Use of this flag for the stack pointer or the frame pointer is
an error.
My question is whether we need to keep the above comment for
other fixed pervasive role registers (other than the sp and fp);
something like:
Use of this flag for the stack pointer or the frame pointer is
an error. Use of this flag for a register that has a fixed
pervasive role in the machine's execution model, other than
the stack pointer and frame pointer, will produce disastrous
results.
Or wether we know that there are no other such fixed registers,
and can drop that second sentance? Does anyone know of other
fixed pervasive role (perhaps machine specific) registers
exist?
I think the "will produce disastrous results" thing is a cop out,
and I'd like to replace it with an actual real life error message,
if we can hunt down all the bad cases.
-gavin...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Doc for -fcall-used-REG and -fcall-saved-REG
1998-10-13 19:22 Doc for -fcall-used-REG and -fcall-saved-REG Gavin Romig-Koch
@ 1998-10-14 8:03 ` Nick Ing-Simmons
1998-10-14 14:44 ` Jeffrey A Law
1 sibling, 0 replies; 3+ messages in thread
From: Nick Ing-Simmons @ 1998-10-14 8:03 UTC (permalink / raw)
To: gavin; +Cc: egcs
Gavin Romig-Koch <gavin@cygnus.com> writes:
>
> Use of this flag for the stack pointer or the frame pointer is
> an error. Use of this flag for a register that has a fixed
> pervasive role in the machine's execution model, other than
> the stack pointer and frame pointer, will produce disastrous
> results.
>
>Or wether we know that there are no other such fixed registers,
>and can drop that second sentance? Does anyone know of other
>fixed pervasive role (perhaps machine specific) registers
>exist?
On my (TI internal) port of GCC2 to TMS320C80's RISC, there is a "return
address" register which is fixed-and pervasive in same manner. (Which register
is used does not matter but it has to be "pervasive" at least between caller and
callee!, and it is easier to fix it as part of ABI.)
In fact in that port it is quite permissible to re-use frame pointer in any
function which does not need alloca() style dynamic frame size.
--
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Doc for -fcall-used-REG and -fcall-saved-REG
1998-10-13 19:22 Doc for -fcall-used-REG and -fcall-saved-REG Gavin Romig-Koch
1998-10-14 8:03 ` Nick Ing-Simmons
@ 1998-10-14 14:44 ` Jeffrey A Law
1 sibling, 0 replies; 3+ messages in thread
From: Jeffrey A Law @ 1998-10-14 14:44 UTC (permalink / raw)
To: Gavin Romig-Koch; +Cc: egcs
In message < m0zTED4-000s8JC@cetus.cygnus.com >you write:
> My question is whether we need to keep the above comment for
> other fixed pervasive role registers (other than the sp and fp);
> something like:
>
> Use of this flag for the stack pointer or the frame pointer is
> an error. Use of this flag for a register that has a fixed
> pervasive role in the machine's execution model, other than
> the stack pointer and frame pointer, will produce disastrous
> results.
>
> Or wether we know that there are no other such fixed registers,
> and can drop that second sentance? Does anyone know of other
> fixed pervasive role (perhaps machine specific) registers
> exist?
argument & return value registers come to mind. Registers which are in a class
by themselves (think HILO on mips, shift count registers and the like). The
return pointer may be another worth worrying about.
jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1998-10-14 14:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-13 19:22 Doc for -fcall-used-REG and -fcall-saved-REG Gavin Romig-Koch
1998-10-14 8:03 ` Nick Ing-Simmons
1998-10-14 14:44 ` Jeffrey A Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).