🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1779

gcc 1.30/80386

#1779
From: James Van Artsdalen
Date: Sun, 16 Oct 1988 02:19
46 lines
2082 bytes
Has anyone been able to compile 1.30 with itself?  I have been unable
to make 1.30 work.  Fortunately 1.28 and 1.30 produce fairly similar
code and I have spotted on problem in the assembly produced by yylex()
in c-parse.tab.c.  Here's a piece of a diff between what 1.28 did and
1.30:

***************
*** 11631,11640 ****
  	cmpl $39,-116(%ebp)
  	jg .L701
  	movl -116(%ebp),%eax
  	sall $2,%eax
- 	movl -116(%ebp),%edx
- 	sall $3,%edx
- 	leal (%edx,%eax),%eax
  	movl reswords(%eax),%eax
  	movl -108(%ebp),%edi
  	movb (%eax),%bl
--- 11616,11625 ----
  	cmpl $39,-116(%ebp)
  	jg .L701
  	movl -116(%ebp),%eax
+ 	sall $1,%eax
+ 	movl -116(%ebp),%edi
+ 	leal (%edi,%eax),%eax
  	sall $2,%eax
  	movl reswords(%eax),%eax
  	movl -108(%ebp),%edi
  	movb (%eax),%bl

My guess is that the reswords offset is being calculated incorrectly:
it appears that 1.28 is getting 12 bytes per entry (correct) and 1.30
gets only 6 bytes.  I don't know where precisely in the source this
assembly comes from: is_reserved_word()'s inlining makes this unclear
to me.

As an aside, how difficult would it be to have the labels that gcc
generates be independent of the sequence of labels within a file?  For
example, could the labels be made dependent upon a source line number
and a sequence within that line?  The reason for this is that it would
make diffs between compiler outputs (like the one above) much more
effective, since labels would not depend on a newer revision of the
compiler generating all labels that previous compilers generated.
-- 
James R. Van Artsdalen      james@bigtex.cactus.org      "Live Free or Die"
Home: 512-346-2444 Work: 338-8789       9505 Arboretum Blvd Austin TX 78759
Technical Details
Message-ID: <9302@bigtex.cactus.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!uunet!tut.cis.ohio-state.edu!rutgers!labrea!agate!eos!ames!killer!texbell!bigtex!james

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!uunet!tut.cis.ohio-state.edu!rutgers!labrea!agate!eos!ames!killer!texbell!bigtex!james
From: james@bigtex.cactus.org (James Van Artsdalen)
Newsgroups: gnu.gcc.bug
Subject: gcc 1.30/80386
Message-ID: <9302@bigtex.cactus.org>
Date: 16 Oct 88 02:19:37 GMT
Organization: F.B.N. Software, Austin TX
Lines: 46