This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug libstdc++/5625] [mips] exception unwinding creates invalid pointer on mips


------- Additional Comments From rsandifo at redhat dot com  2004-02-05 20:42 -------
Subject: Re:  [mips] exception unwinding creates invalid
 pointer on mips

"wilson at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
> The MIPS port is the only 64-bit port that I am aware of which sets
> Pmode to SImode when generating ILP32 code.  This is arguably a bug in
> the mips port.

And later:

> I was looking at other 64-bit targets like Alpha and IA-64, but it
> occurs to me that MIPS is somewhat different, in that we have a complete
> set of both 32-bit and 64-bit operations (or at least we can pretend
> that we do have them all), and thus maybe an SImode Pmode makes more
> sense for 64-bit ILP32 MIPS than it does for other targets.

Right.  The Pmode == ptr_mode thing is deliberate: if you change Pmode
to DImode for 32-bit ptr_mode, then the loop optimisers are no longer
able to recognise ivs properly.  Any pointer + integer will involve
a sign-extension.

It was suggested that you can reduce this effect by making PROMOTE_MODE
promote to DImode.  But we (well, OK, Eric ;) tried that for mips-rewrite
and it resulted in a chronic loss of performance.  This is because we can
only enforce the "SImode registers are sign-extended" rule via
TRULY_NOOP_TRUNCATION.  Promoting everything to DImode introduces
a _lot_ of truncations.

FWIW, I like your suggestion of introducing a special builtin-function.

Richard



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5625


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