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]

Re: How to clean up i386 machine description?


Mike Stump writes:
> 
> > Date: Wed, 18 Nov 1998 12:26:42 -0700
> > From: Jeffrey A Law <law@cygnus.com>
> 
> >   In message <199811122144.NAA19144@Sunburn.Stanford.EDU>you write:
> >   > I don't think the goal is to have a clean-looking machine description;
> >   > the x86 architecture is itself too messy for that.
> > I disagree.  It *is* one of the goals.  Messy machine descriptions lead to
> > bugs and long term maintenance problems.  We should be addressing those
> > issues as well as the performance issues.
> 
> I agree with Jeff.  If one finds oneself doing what they consider
> messy, then try and envision a new way of describing the problem in
> the md and lets talk about it.  We may not get it implemented right
> away, but knowing how to improve the description processor (if it is a
> recurring theme present in md files) so support more natural
> descriptions and even writting that down as a TODO item is a whole lot
> better than just ignoring the elephant.  Others might find delight in
> implementing what others want, but can't afford to write it.
> 
> I seem to recall reading years ago that someone (rms) wanted the
> addressing modes mdized, instead of the #define they are today.  This
> is an example of the type of thing that might help make things more
> regular/descriptive and nice looking.

Thanks for your comments.  Just to be clear, I wasn't advocating a
really messy machine description.  (I should have said "primary goal"
in the sentence I wrote above.)  It just seemed to me that there were
limits to how clean we could make the x86 machine description and
still generate optimal code for the various x86 implementations.  The
large number of implementations, the inherent messiness of the x86
architecture, and the limitations of the current machine description
format all constrain what we can do.

Of course, we could make things cleaner by hiding some of the x86
architecture's uglier features and ignoring details of the various
implementations.  But that sort of cleanliness, purchased at the
expense of good code generation, strikes me as not very valuable.

However, I strongly agree that we should try to make the description
as clean as possible within the limitations we're faced with.  And if
there are ways to improve the md file format so we could make things
even cleaner, that would be a major improvement.

-- 
Colin Douglas Howell                    Systems Administrator
e-mail:  howell@cs.stanford.edu         Computer Facilities Group
office:  (650) 723-2491                 Computer Science Department
                                        Stanford University


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