This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[c/c++] i686 codegen bugs in tinfo2.cc
- To: gcc-bugs at gcc dot gnu dot org, rth at cygnus dot com, scox at redhat dot com
- Subject: [c/c++] i686 codegen bugs in tinfo2.cc
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Wed, 10 Jan 2001 18:57:56 -0800
The following c++ testfailures only occur with i686, and not on
i586. I'm hoping that the x86 port maintainers can help me out....
-r 8 0.175 16064 1948 356330 22_locale/operators.cc
__throw_type_match_rtti_2
-r 6 0.128 18896 2044 320303 27_io/ios_base_callbacks.cc
std::locale::_Impl::_Impl(std::locale::_Impl const&,
std::string const&, unsigned, unsigned)
std::string::compare(char const*) const
std::string::_M_mutate(unsigned, unsigned, unsigned) // strlen len2 == toobig
-r 7 0.000 28064 2588 423303 27_io/ios_manip_fmtflags.cc
__throw_type_match_rtti_2
-r 9 0.227 40464 3580 428996 27_io/istream_extractor_arith.cc
__throw_type_match_rtti_2
Of these, most die in __throw_type_match_rtti_2. Comparing the
assembly of this file (tinfo2.cc in libsupc++, part of libstdc++-v3)
tinfo2.cc:226
extern "C" int
__throw_type_match_rtti_2 (const void *catch_type_r, const void *throw_type_r,
void *objptr, void **valp)
{
const type_info &catch_type = *(const type_info *)catch_type_r;
const type_info &throw_type = *(const type_info *)throw_type_r;
*valp = objptr;
#if !defined(__GXX_ABI_VERSION) || __GXX_ABI_VERSION < 100
// old abi
[skip]
#else
// new abi
return catch_type.__do_catch (&throw_type, valp, 1);
#endif
return 0;
}
I get:
// i585
00000000 <__throw_type_match_rtti_2>:
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 51 push %ecx
4: 51 push %ecx
5: 8b 4d 08 mov 0x8(%ebp),%ecx
8: 8b 55 14 mov 0x14(%ebp),%edx
b: 8b 45 10 mov 0x10(%ebp),%eax
e: 89 02 mov %eax,(%edx)
10: 8b 01 mov (%ecx),%eax
12: 6a 01 push $0x1
14: 52 push %edx
15: 8b 55 0c mov 0xc(%ebp),%edx
18: 52 push %edx
19: 51 push %ecx
1a: ff 50 10 call *0x10(%eax)
1d: 25 ff 00 00 00 and $0xff,%eax
22: 89 ec mov %ebp,%esp
24: 5d pop %ebp
25: c3 ret
26: 8d 76 00 lea 0x0(%esi),%esi
29: 8d bc 27 00 00 00 00 lea 0x0(%edi,1),%edi
// i686
Disassembly of section .text.__throw_type_match_rtti_2:
00000000 <__throw_type_match_rtti_2>:
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 ec 08 sub $0x8,%esp
6: 8b 45 10 mov 0x10(%ebp),%eax
9: 8b 4d 08 mov 0x8(%ebp),%ecx <---missing push %ecx
c: 8b 55 14 mov 0x14(%ebp),%edx
f: 89 02 mov %eax,(%edx)
11: 8b 01 mov (%ecx),%eax
13: 6a 01 push $0x1
15: 52 push %edx
16: 8b 55 0c mov 0xc(%ebp),%edx
19: 52 push %edx
1a: 51 push %ecx
1b: ff 50 10 call *0x10(%eax)
1e: 89 ec mov %ebp,%esp
20: 5d pop %ebp
21: 0f b6 c0 movzbl %al,%eax
24: c3 ret
25: 8d 74 26 00 lea 0x0(%esi,1),%esi
29: 8d bc 27 00 00 00 00 lea 0x0(%edi,1),%edi
These fails have been present for some time now,
unfortunately. Looking back through my testresults, I see that
+ 20001030-mkcheck.txt
+ 20001112-mkcheck.txt
+ 20001127-mkcheck.txt
(results in between here for shared go + and -)
- 20001231-mkcheck.txt-gcc
so that sometime in the last month something happened where
i686 started getting weird with c++ code...
any ideas?
-benjamin