Help with gmp-4.0.1 and gcc-3.3.1 on sparcv9?
David Edelsohn
dje at watson.ibm.com
Thu Oct 2 14:16:31 CEST 2003
------- Forwarded Message
Date: Thu, 2 Oct 2003 13:11:08 -0400
From: Jakub Jelinek <jakub at redhat.com>
To: Bradley Lucier <lucier at math.purdue.edu>
Cc: gcc at gcc.gnu.org
Subject: Re: Help with gmp-4.0.1 and gcc-3.3.1 on sparcv9?
On Thu, Oct 02, 2003 at 12:04:32PM -0500, Bradley Lucier wrote:
>
> On Wednesday, October 1, 2003, at 07:28 PM, Bradley Lucier wrote:
>
> >
> > On Wednesday, October 1, 2003, at 03:23 PM, Jakub Jelinek wrote:
> >
> >> Looks to be gmp bug:
> >> __asm__ ("subcc %4,%5,%1\n"
> >> " subccc %6,%7,%%g0\n"
> >> " subc %2,%3,%0"
> >> : "=r" (_xh), "=&r" (_r)
> >> : "%rJ" ((r)), "rI" (_xh), "%rJ" ((n0)), "rI" (_xl), "rJ" (((n0))
> >> >> 32), "rJ" ((_xl) >> 32)
> >> : "cc");
> >> Obviously, the %2 is not commutative with %3 and neither is %4 with
> >> %5.
> >> Just s/"%r/"r/g should fix it.
> >
> > I don't understand syntax for assembler statements; but replacing %r
> > by r in the second last line didn't fix it. (This is from the macro
> > for sub_ddmmss in longlong.h.)
>
> Never mind, there are bootstrap comparison failures with just the C
> compiler. I'll wait for a while before trying to test the branch again
> on sparcv9.
There are actually more bugs in that __asm too.
"rJ" should be used for the args which end up in rs1 (%2, %4, %6),
while "rI" should be used for the rest of input args (%3, %5, %7).
Also, in the asm pattern, where argument has J in it it should be %rN
instead of %N, ie. subcc %r4,%5,%1 etc.
Jakub
------- End of Forwarded Message
More information about the gmp-devel
mailing list