marius 2008-07-05 15:28:30 UTC
FreeBSD src repository
Modified files:
sys/sparc64/include in_cksum.h
Log:
SVN rev 180297 on 2008-07-05 15:28:30Z by marius
Revert the addition of __volatile to __asm done in r180011, since
the condition codes where added to the clobber
marius 2008-07-05 16:28:08 UTC
FreeBSD src repository
Modified files:(Branch: RELENG_7)
sys/sparc64/include in_cksum.h
Log:
SVN rev 180300 on 2008-07-05 16:28:08Z by marius
MFC: r180073
Add the condition codes to the clobber list.
Revision Changes
marius 2008-07-05 16:28:52 UTC
FreeBSD src repository
Modified files:(Branch: RELENG_6)
sys/sparc64/include in_cksum.h
Log:
SVN rev 180301 on 2008-07-05 16:28:52Z by marius
MFC: r180073
Add the condition codes to the clobber list.
Revision Changes
On Sat, Jun 28, 2008 at 03:52:16PM +0200, Christoph Mallon wrote:
Marius Strobl wrote:
On Sat, Jun 28, 2008 at 02:08:10PM +0200, Christoph Mallon wrote:
Marius Strobl wrote:
On a related note: Is inline assembler really necessary here? For
example couldn't in_addword() be written as
static
Bruce Evans wrote:
I think the bug was the following:
subcc %foo, %bar, %g0 /* SPARC compare */
#APP
/* inline assembler of in_addword() here, which modifies the condition
codes */
#NO_APP
bpl $somewhere /* condition branch depending on condition code */
Is the non-#APP part all from C code?
Bruce Evans wrote:
Right. Though I've never seen unnecessary's __volatiles significantly
affecting i386 code. This is because the code in the asms can't be
removed completely, and can't be moved much either. With out of order
execution, the type of moves that are permitted (not across
On Sun, 29 Jun 2008, Christoph Mallon wrote:
Bruce Evans wrote:
I have to disagree. Where does the GCC documentation state, that cc has
no effect on x86? It is the other way round: The compiler assumes, the
Well, in gcc-1.40, gcc.info says nothing about cc, apparently because
cc didn't
On Sun, 29 Jun 2008, Christoph Mallon wrote:
Bruce Evans wrote:
Right. Though I've never seen unnecessary's __volatiles significantly
affecting i386 code. This is because the code in the asms can't be
removed completely, and can't be moved much either. With out of order
execution, the type
Bruce Evans wrote:
On Fri, 27 Jun 2008, Christoph Mallon wrote:
Marius Strobl wrote:
marius 2008-06-25 21:04:59 UTC
FreeBSD src repository
Modified files:
sys/sparc64/include in_cksum.h Log:
SVN rev 180011 on 2008-06-25 21:04:59Z by marius
Use __asm __volatile rather
Bruce Evans wrote:
On Sat, 28 Jun 2008, Christoph Mallon wrote:
I still think, using __volatile only works by accident. volatile for
an assembler block mostly means this asm statement has an effect,
even though the register specification looks otherwise, so do not
optimise this away (i.e.
On Sat, Jun 28, 2008 at 12:09:13PM +1000, Bruce Evans wrote:
On Sat, 28 Jun 2008, Marius Strobl wrote:
On Fri, Jun 27, 2008 at 09:58:31PM +0200, Christoph Mallon wrote:
This approach seems wrong to me and I think it works only by chance. The
I wasn't aware that the clobber list allows to
On Sat, Jun 28, 2008 at 12:57:28AM +0200, Christoph Mallon wrote:
Marius Strobl wrote:
I wasn't aware that the clobber list allows to explicitly specify
the condition codes, thanks for the hint. Though it unfortunately
took me longer than two days to verify it's effect on the generated
code;
Marius Strobl wrote:
On a related note: Is inline assembler really necessary here? For
example couldn't in_addword() be written as
static __inline u_short
in_addword(u_short const sum, u_short const b)
{
u_int const t = sum + b;
return t + (t 16);
} ?
This should at least produce
Christoph Mallon wrote:
As a compiler construction I can tell you, that regarding optimisation
there is no such thing as certainty.
Uh...right... s/construction/constructor/
___
cvs-all@freebsd.org mailing list
On Sat, Jun 28, 2008 at 12:56:08AM +0200, Christoph Mallon wrote:
Marius Strobl wrote:
marius 2008-06-27 22:17:14 UTC
FreeBSD src repository
Modified files:
sys/sparc64/include in_cksum.h
Log:
SVN rev 180073 on 2008-06-27 22:17:14Z by marius
Improve r180011 by
On Sat, Jun 28, 2008 at 02:08:10PM +0200, Christoph Mallon wrote:
Marius Strobl wrote:
On a related note: Is inline assembler really necessary here? For
example couldn't in_addword() be written as
static __inline u_short
in_addword(u_short const sum, u_short const b)
{
u_int const t =
Marius Strobl wrote:
On Sat, Jun 28, 2008 at 12:56:08AM +0200, Christoph Mallon wrote:
Marius Strobl wrote:
marius 2008-06-27 22:17:14 UTC
FreeBSD src repository
Modified files:
sys/sparc64/include in_cksum.h
Log:
SVN rev 180073 on 2008-06-27 22:17:14Z by marius
Improve
Marius Strobl wrote:
On Sat, Jun 28, 2008 at 02:08:10PM +0200, Christoph Mallon wrote:
Marius Strobl wrote:
On a related note: Is inline assembler really necessary here? For
example couldn't in_addword() be written as
static __inline u_short
in_addword(u_short const sum, u_short const b)
{
On Sat, 28 Jun 2008, Christoph Mallon wrote:
Bruce Evans wrote:
Does sparc64 do anything good with this? Later it says that this is
[cc clobber in asm statements]
irrelevant for the type type of bug in in_cksum.* (expecting cc to
be preserved across
On Sat, 28 Jun 2008, Marius Strobl wrote:
On Sat, Jun 28, 2008 at 12:09:13PM +1000, Bruce Evans wrote:
On Sat, 28 Jun 2008, Marius Strobl wrote:
I think it still only works by chance.
[volatile]
Besides I don't think using __volatile for this is
that wrong, given that the
Bruce Evans wrote:
So by now you are saying that using __volatile in this case
is the wrong solution and that using cc is a style bug. How
am I supposed to tell the compiler that the inline assembler
alters the condition codes then, which it apparently needs to
know as it at shown to otherwise
Marius Strobl wrote:
marius 2008-06-25 21:04:59 UTC
FreeBSD src repository
Modified files:
sys/sparc64/include in_cksum.h
Log:
SVN rev 180011 on 2008-06-25 21:04:59Z by marius
Use __asm __volatile rather than __asm for instruction sequences
that modify condition
marius 2008-06-27 22:17:14 UTC
FreeBSD src repository
Modified files:
sys/sparc64/include in_cksum.h
Log:
SVN rev 180073 on 2008-06-27 22:17:14Z by marius
Improve r180011 by explicitly adding the condition codes to the
clobber list.
Suggested by: Christoph Mallon
On Fri, Jun 27, 2008 at 09:58:31PM +0200, Christoph Mallon wrote:
Marius Strobl wrote:
marius 2008-06-25 21:04:59 UTC
FreeBSD src repository
Modified files:
sys/sparc64/include in_cksum.h
Log:
SVN rev 180011 on 2008-06-25 21:04:59Z by marius
Use __asm
Marius Strobl wrote:
marius 2008-06-27 22:17:14 UTC
FreeBSD src repository
Modified files:
sys/sparc64/include in_cksum.h
Log:
SVN rev 180073 on 2008-06-27 22:17:14Z by marius
Improve r180011 by explicitly adding the condition codes to the
clobber list.
You should
Marius Strobl wrote:
I wasn't aware that the clobber list allows to explicitly specify
the condition codes, thanks for the hint. Though it unfortunately
took me longer than two days to verify it's effect on the generated
code; sparc64 could still have been one of the archs where cc has
no
On Fri, 27 Jun 2008, Christoph Mallon wrote:
Marius Strobl wrote:
marius 2008-06-25 21:04:59 UTC
FreeBSD src repository
Modified files:
sys/sparc64/include in_cksum.h Log:
SVN rev 180011 on 2008-06-25 21:04:59Z by marius
Use __asm __volatile rather than __asm for
On Sat, 28 Jun 2008, Marius Strobl wrote:
On Fri, Jun 27, 2008 at 09:58:31PM +0200, Christoph Mallon wrote:
This approach seems wrong to me and I think it works only by chance. The
I wasn't aware that the clobber list allows to explicitly specify
the condition codes, thanks for the hint.
On Sat, 28 Jun 2008, Christoph Mallon wrote:
I still think, using __volatile only works by accident. volatile for an
assembler block mostly means this asm statement has an effect, even though
the register specification looks otherwise, so do not optimise this away
(i.e. no CSE, do not remove
marius 2008-06-25 21:04:59 UTC
FreeBSD src repository
Modified files:
sys/sparc64/include in_cksum.h
Log:
SVN rev 180011 on 2008-06-25 21:04:59Z by marius
Use __asm __volatile rather than __asm for instruction sequences
that modify condition codes (the carry bit, in
marius 2006-01-23 14:45:24 UTC
FreeBSD src repository
Modified files:(Branch: RELENG_6)
sys/sparc64/include in_cksum.h
Log:
MFC: 1.3
- The inline asm in this file uses output operands before all input
operands are consumed so use the appropriate constraint
marius 2006-01-12 11:40:39 UTC
FreeBSD src repository
Modified files:
sys/sparc64/include in_cksum.h
Log:
- The inline asm in this file uses output operands before all input
operands are consumed so use the appropriate constraint modifier.
Before this change GCC used
32 matches
Mail list logo