This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: libstdc++/5625: exception unwinding creates invalid pointer on mips
- From: Ed Maste <emaste at SANDVINE dot com>
- To: "'echristo at gcc dot gnu dot org'" <echristo at gcc dot gnu dot org>, "'echristo at redhat dot com'" <echristo at redhat dot com>, Ed Maste <emaste at SANDVINE dot com>, "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>, "'gcc-prs at gcc dot gnu dot org'" <gcc-prs at gcc dot gnu dot org>, "'gcc-gnats at gcc dot gnu dot org'" <gcc-gnats at gcc dot gnu dot org>
- Date: Tue, 23 Apr 2002 15:35:33 -0400
- Subject: RE: libstdc++/5625: exception unwinding creates invalid pointer on mips
Yes, the MIPS documentation states that the destination register
gets the sign-extended result ("GPR[rt]<-sign_extend(temp31..0)").
However, note the ADDIU instruction Restrictions section:
Restrictions:
If GPR rs does not contain a sign-extended
32-bit value (bits 63..31 equal), then the
result of the operation is UNPREDICTABLE.
And then, on page 2:
1.2.1 UNPREDICTABLE
UNPREDICTABLE results may vary from processor
implementation to implementation, instruction
to instruction, or as a function of time on the
same implementation or instruction. Software can
never depend on results that are UNPREDICTABLE.
UNPREDICTABLE operations may cause a result to
be generated or not. If a result is generated,
it is UNPREDICTABLE. UNPREDICTABLE operations
may cause arbitrary exceptions.
-ed
http://www.mips.com/publications/documentation/MD00087-2B-MIPS64BIS-AFP-00.9
5.pdf
(no comma attached to the end of the URL this time!)