This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Preserve registers across function call (Re: CALL_USED_REGISTERS)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]