Nix <nix(a)esperi.demon.co.uk> wrote:
-mcpu=ultrasparc is known buggy in GCC-2.95.x.
-mcpu=v8 -mtune=ultrasparc works rather better.
(Hell, -mcpu=ultrasparc is known buggy in GCC-3.1, but the bugs are
rather little things in 3.1 and being rapidly stamped out; I'd call
-mcpu=ultrasparc as safe to use there as any other option. In 2.95.x the
bugs in UltraSPARC support are much larger, and I'd avoid
-mcpu=ultrasparc there if at all possible. It even miscompiles zlib...)
Dang. I'm going to have to rein in my altruistic impulses. This has
gotten way more involved than I thought it would.
Okay, so now I've recompiled without *any* -mcpu=xxx flags, which should
give me the default v7 output. It still crashes in the same place. The
instruction stream now looks like this:
.LL339:
.stabn 68,0,910,.LLM393-Flet
.LLM393:
.LLBB32:
.stabn 68,0,911,.LLM394-Flet
.LLM394:
ldub [%l0], %o1
andcc %l0, 3, %o0
.stabn 68,0,910,.LLM395-Flet
.LLM395:
add %l1, 4, %l1
.stabn 68,0,911,.LLM396-Flet
.LLM396:
bne .LL342
add %l5, 1, %l5
cmp %o1, 4
bne .LL373
cmp %o0, 0
.stabn 68,0,912,.LLM397-Flet
.LLM397:
ld [%l4+%lo(Qnil)], %o0
b .LL338
st %o0, [%l1-4]
That's even worse than it was in the -mcpu=ultrasparc case. Now the
ldub has floated all the way to the top, before it even does the andcc
to get the type!
--
Jerry James
http://www.ittc.ku.edu/~james/