🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1275

Minor bug in config/alpha.c

#1275
From: Daniel S. Riley
Date: Thu, 05 Nov 1992 13:12
47 lines
2534 bytes
Reading specs from /usr/local/lib/gcc-lib/alpha-dec-osf1/2.3.1/specs
gcc version 2.3.1
 /usr/local/lib/gcc-lib/alpha-dec-osf1/2.3.1/cpp -lang-c -v -undef -D__GNUC__=2 -Dunix -D__osf__ -D__alpha -D__alpha__ -D_LONGLONG -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__unix__ -D__osf__ -D__alpha -D__alpha__ -D___LONGLONG__ -D__SYSTYPE_BSD__ -D___SYSTYPE_BSD__ -D__unix -D__osf__ -D__alpha -D__alpha__ -D___LONGLONG -D__SYSTYPE_BSD -D___SYSTYPE_BSD -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C asdf.c /tmp/cc005249.i
GNU CPP version 2.3.1
 /usr/local/lib/gcc-lib/alpha-dec-osf1/2.3.1/cc1 /tmp/cc005249.i -quiet -dumpbase asdf.c -version -o asdf.s
GNU C version 2.3.1 compiled by GNU C version 2.3.1.

gcc 2.3.1 configured for alpha-osf1 produces invalid assembly for code
with greater than 32kbytes of auto variables, e.g. something like

main() { long asdf[8100]; } /* yes, this is a complete example */

produces assembly with the sequence

	.frame $15,0,$26
	stq $26,0($30)
	stq $15,8($30)
	.mask 0x4008000,-64816
	add $30,$28,$15

There is no "add" instruction.  This appears to be a minor typo in alpha.c,
which I believe can be fixed with this patch:

*** config/alpha.c.orig	Mon Nov  2 12:38:45 1992
--- config/alpha.c	Thu Nov  5 17:22:11 1992
***************
*** 1359,1365 ****
        if (frame_size == 32768)
  	fprintf (file, "\tlda $15,16384($30)\n\tlda $15,16384($15)\n");
        else if (frame_size > 32768)
! 	fprintf (file, "\tadd $30,$28,$15\n");
        else
  	fprintf (file, "\tlda $15,%d($30)\n", frame_size);
      }
--- 1359,1365 ----
        if (frame_size == 32768)
  	fprintf (file, "\tlda $15,16384($30)\n\tlda $15,16384($15)\n");
        else if (frame_size > 32768)
! 	fprintf (file, "\taddq $30,$28,$15\n");
        else
  	fprintf (file, "\tlda $15,%d($30)\n", frame_size);
      }

--
Dan Riley                          Internet:   dsr@lns598.tn.cornell.edu
Wilson Lab, Cornell University     HEPNET/SPAN: lns598::dsr (44630::dsr)
	      "Distance means nothing/To me." -Kate Bush
Technical Details
Message-ID: <9211052312.AA05194@lns598.TN.CORNELL.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!lns598.tn.cornell.edu!dsr

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!lns598.tn.cornell.edu!dsr
From: dsr@lns598.tn.cornell.edu (Daniel S. Riley)
Subject: Minor bug in config/alpha.c
Message-ID: <9211052312.AA05194@lns598.TN.CORNELL.EDU>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 5 Nov 1992 13:12:38 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 48