Article View: gnu.gcc.bug
Article #714Bug in tm-mips.h, gcc 1.36
From: Dirk Grunwald
Date: Mon, 16 Oct 1989 21:36
Date: Mon, 16 Oct 1989 21:36
73 lines
3190 bytes
3190 bytes
configuration: config.gcc decstation, version 1.36 with a couple of patches
symptom: can't allocate large stack frames
repeat-by:
try to compile:
foo()
{
int x[100000];
bar(x);
}
fix: apply following patch to tm-mips.h & recompile final.o. I
defined ASM_TMP_REG as register #1, corresponding to the temporary
register ($at) used by the assembler to construct 32 bit literals.
*** /tmp/,RCSt1a00878 Mon Oct 16 15:32:49 1989
--- tm-mips.h Mon Oct 16 15:29:59 1989
***************
*** 396,401 ****
--- 396,404 ----
/* Base register for access to local variables of the function. */
#define FRAME_POINTER_REGNUM 30
+ /* Assembler temporary register */
+ #define ASM_TMP_REGNUM 1
+
/* Value should be nonzero if functions must have frame pointers.
Zero means the frame pointer need not be set up (and parms
may be accessed via the stack pointer) in functions that seem suitable.
***************
*** 956,968 ****
push_loc, fp_str); \
push_loc += 8; \
} \
! if (frame_pointer_needed) \
! fprintf (FILE, "\taddiu\t%s,%s,%d\t#Establish FramePTR\n", \
! (TARGET_NAME_REGS ? reg_names[FRAME_POINTER_REGNUM] \
! : reg_numchar[FRAME_POINTER_REGNUM]), \
! (TARGET_NAME_REGS ? reg_names[29] : reg_numchar[29]), \
! tsize); \
! fprintf (FILE," #END PROLOGUE\n"); \
}
/* Output assembler code to FILE to increment profiler label # LABELNO
--- 959,986 ----
push_loc, fp_str); \
push_loc += 8; \
} \
! if (frame_pointer_needed) { \
! if ( CONST_OK_FOR_LETTER_P(tsize, 'I') ) { \
! fprintf (FILE, "\taddiu\t%s,%s,%d\t#Establish FramePTR\n", \
! (TARGET_NAME_REGS ? reg_names[FRAME_POINTER_REGNUM] \
! : reg_numchar[FRAME_POINTER_REGNUM]), \
! (TARGET_NAME_REGS ? reg_names[29] : reg_numchar[29]),\
! tsize); \
! } else { \
! fprintf (FILE, "\t.set noat"); \
! fprintf (FILE, "\tlui\t %s,0x%x\n", \
! reg_numchar[ ASM_TMP_REGNUM ], tsize & 0x0000ffff); \
! fprintf (FILE, "\tori\t %s,0x%x\n", \
! reg_numchar[ ASM_TMP_REGNUM ], (tsize >> 16) & 0x0000ffff);\
! fprintf (FILE, "\taddu\t%s,%s,%s\t#Establish FramePTR\n", \
! (TARGET_NAME_REGS ? reg_names[FRAME_POINTER_REGNUM] \
! : reg_numchar[FRAME_POINTER_REGNUM]), \
! (TARGET_NAME_REGS ? reg_names[29] : reg_numchar[29]),\
! reg_numchar[ ASM_TMP_REGNUM ]); \
! fprintf (FILE, "\t.set at"); \
! } \
! } \
! fprintf (FILE," #END PROLOGUE\n"); \
}
/* Output assembler code to FILE to increment profiler label # LABELNO
Technical Details
Message-ID:
<8910162136.AA00885@foobar.colorado.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!foobar.colorado.edu!grunwaldShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!foobar.colorado.edu!grunwald From: grunwald@foobar.colorado.edu (Dirk Grunwald) Newsgroups: gnu.gcc.bug Subject: Bug in tm-mips.h, gcc 1.36 Message-ID: <8910162136.AA00885@foobar.colorado.edu> Date: 16 Oct 89 21:36:30 GMT Sender: daemon@tut.cis.ohio-state.edu Reply-To: grunwald@foobar.colorado.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 73