public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Makoto Fujiwara <makoto@ki.nu>
To: gcc@gcc.gnu.org
Subject: Re: Preserve registers across function call (Re: CALL_USED_REGISTERS)
Date: Fri, 17 Jul 2009 09:17:00 -0000	[thread overview]
Message-ID: <yfm1vofactb.wl%makoto@ki.nu> (raw)
In-Reply-To: <4A5F467D.9000504@redhat.com>

Richard, thanks for great help,
I think it'been more than serveral weeks :-) to figure out why.
Now I am in good mood. thanks a lot, really appreciate.

The fragments of the code for mine is like follows.
(It is 4.2.1 based)

(save)

+  for (regno = 0; regno < FIRST_PSEUDO_REGISTER ; regno++)
+    {
+      if (!fixed_regs[regno] && regs_ever_live[regno] && !call_used_regs[regno])
+        {
+          insn = emit_insn (gen_pushqi (gen_rtx_REG (Pmode, regno)));
+          //      RTX_FRAME_RELATED_P (insn) = 1;
+        }
+    }

(restore)

+  for (regno = FIRST_PSEUDO_REGISTER ; regno-- > 0; ) {
+      if ((!fixed_regs[regno] )&& regs_ever_live[regno] && (!call_used_regs[regno])) {
+           insn = emit_insn (gen_popqi (gen_rtx_REG (QImode, regno)));
+           //      RTX_FRAME_RELATED_P (insn) = 1;
+         }
+  }

Why QImode ? Don't ask that for the moment, 
Thanks again,
---
Makoto Fujiwara, 
Chiba, Japan, Narita Airport and Disneyland prefecture.

      reply	other threads:[~2009-07-17  9:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-16  8:47 Makoto Fujiwara
2009-07-16 15:26 ` Richard Henderson
2009-07-17  9:17   ` Makoto Fujiwara [this message]

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=yfm1vofactb.wl%makoto@ki.nu \
    --to=makoto@ki.nu \
    --cc=gcc@gcc.gnu.org \
    /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).