[parisc-linux] Re: C++ Issue on GCC 3.0 branch

Alan Modra alan@SPRI.Levels.UniSA.Edu.Au
Mon, 14 May 2001 12:48:31 +0930 (CST)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--296515328-51119847-989810311=:12094
Content-Type: TEXT/PLAIN; charset=US-ASCII



On Sun, 13 May 2001, John David Anglin wrote:

> > On Sun, 13 May 2001, Alan Modra wrote:
> >
> > > How about this?  Warning, not even compiled!  I'm just tossing ideas
> > > around.
> >
> > And of course, the first little test I tried showed a problem.  :-(
> > The inlined code looks OK, but that emitted for the non-inlined copy
> > doesn't init the pic reg.

This was back-to-front.  It was the inline code that was bad.

> After I wrote, I realized that I had picked the wrong register. Then I
> had second thoughts about the method.  Here is another idea that seems
> at least to do the right thing compiling libobjc/init.c.  The CSE
> results in the same hard register being used for inlined functions.
> However, if Alan can get integrate to do the right thing, that might
> be better.  It will be tomorrow before I have complete test results.

Funny, I like your approach better than mine, but I went ahead and made
the fairly obvious fix to my code to make it work.  Attached is the diff
against pehc, but I guess the whole exercise is now a little pointless
given rth's latest eh changes.

-- 
Alan


--296515328-51119847-989810311=:12094
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="papic1.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.30.0105141248310.12094@mullet.itr.unisa.edu.au>
Content-Description: 
Content-Disposition: attachment; filename="papic1.diff"

Z2NjL0NoYW5nZUxvZy5wdWZmaW4NCgkqIGNvbmZpZy9wYS9wYS5jIChocHBh
X2luaXRfcGljX3NhdmUpOiBSZXZlcnQgYmFjayB0byBzYXZpbmcgcGljDQoJ
cmVnaXN0ZXIgYWZ0ZXIgbGFzdF9wYXJtX2luc24uDQoJKGhwcGFfaW5saW5l
X3BpY19pbml0KTogTmV3IGZ1bmN0aW9uLg0KCSogY29uZmlnL3BhL3BhLmgg
KElOTElORV9QSUNfSU5JVCk6IERlZmluZS4NC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