public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@airs.com>
To: Gunther Nikl <gni@gecko.de>
Cc: gcc@gcc.gnu.org
Subject: Re: inserting instructions into prologue/epilogue
Date: Wed, 03 Aug 2005 17:50:00 -0000	[thread overview]
Message-ID: <m3slxqhpvm.fsf@gossamer.airs.com> (raw)
In-Reply-To: <20050803144045.GA19698@lorien.int.gecko.de>

Gunther Nikl <gni@gecko.de> writes:

> I am trying to add instructions into function prologue/epilogue. These
> instructions shall save and load "fixed" registers to avoid assembly.
> 
> Register saving in the prologue appears to work. The restore code in the
> epilogue aborts in flow.c/propagate_one_insn with
> 
>   "Attempt to delete prologue/epilogue insn"
> 
> unless the stackslot was marked with MEM_VOLATILE_P. I don't think thats
> the proper fix.

As Nathan said, you can add a USE.  Or in some cases the correct fix
is to define EPILOGUE_USES and/or EH_USES.

In some cases this error message can indicate a bug in the
prologue/epilogue code.  For example, if you accidentally try to save
two different registers into the same stack slot, flow will cleverly
try to delete the first store, and then cleverly notice that it is
deleting a prologue insn.  Similarly if you accidentally save a
register into a stack slot which is being used for a temporary
variable.

Ian

  parent reply	other threads:[~2005-08-03 17:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-03 14:40 Gunther Nikl
2005-08-03 14:50 ` Nathan Sidwell
2005-08-03 14:53   ` Nathan Sidwell
2005-08-03 15:27     ` Gunther Nikl
2005-08-03 18:09       ` Richard Henderson
2005-08-03 17:50 ` Ian Lance Taylor [this message]
2005-08-04 12:02   ` Gunther Nikl
2005-08-04 16:57     ` Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3slxqhpvm.fsf@gossamer.airs.com \
    --to=ian@airs.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gni@gecko.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).