Re: cvs commit: src/sys/sparc64/include in_cksum.h

2008-06-27 Thread Christoph Mallon
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

Re: cvs commit: src/sys/sparc64/include in_cksum.h

2008-06-27 Thread Christoph Mallon
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

Re: cvs commit: src/sys/sparc64/include in_cksum.h

2008-06-27 Thread Christoph Mallon
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 effec

Re: cvs commit: src/sys/sparc64/include in_cksum.h

2008-06-28 Thread Christoph Mallon
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&qu

Re: cvs commit: src/sys/sparc64/include in_cksum.h

2008-06-28 Thread Christoph Mallon
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

Re: cvs commit: src/sys/sparc64/include in_cksum.h

2008-06-28 Thread Christoph Mallon
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 equa

Re: cvs commit: src/sys/sparc64/include in_cksum.h

2008-06-28 Thread Christoph Mallon
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 http://lists.freebsd.o

Re: cvs commit: src/sys/sparc64/include in_cksum.h

2008-06-28 Thread Christoph Mallon
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

Re: cvs commit: src/sys/sparc64/include in_cksum.h

2008-06-28 Thread Christoph Mallon
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 co

Re: cvs commit: src/sys/sparc64/include in_cksum.h

2008-06-28 Thread Christoph Mallon
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 otherwis

Re: cvs commit: src/sys/sparc64/include in_cksum.h

2008-06-28 Thread Christoph Mallon
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?

Re: cvs commit: src/sys/sparc64/include in_cksum.h

2008-06-29 Thread Christoph Mallon
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 depende

Re: cvs commit: src/include _ctype.h

2007-10-29 Thread Christoph Mallon
Andrey A. Chernov wrote: ache2007-10-27 22:32:28 UTC FreeBSD src repository Modified files: include _ctype.h Log: Micro-optimization of prev. commit, change (_c < 0 || _c >= 128) to (_c & ~0x7F) Revision ChangesPath 1.33 +1 -1 src/incl

Re: cvs commit: src/include _ctype.h

2007-10-31 Thread Christoph Mallon
Andrey Chernov wrote: On Mon, Oct 29, 2007 at 09:48:16PM +0100, Christoph Mallon wrote: Andrey A. Chernov wrote: ache2007-10-27 22:32:28 UTC FreeBSD src repository Modified files: include _ctype.h Log: Micro-optimization of prev. commit, change (_c < 0 ||

Re: cvs commit: src/include _ctype.h

2007-10-31 Thread Christoph Mallon
Andrey Chernov wrote: On Thu, Nov 01, 2007 at 03:23:56AM +1100, Bruce Evans wrote: In fact, one of the cleanups/optimizations in rev.1.5 and 1.6 by ache and me was to get rid of the mask. There was already a check for _c < 0, so the mask cost even more. The top limit was 256 instead of 128, so

Re: cvs commit: src/include _ctype.h

2007-10-31 Thread Christoph Mallon
Andrey Chernov wrote: On Wed, Oct 31, 2007 at 10:33:49PM +, Alexey Dokuchaev wrote: For ones who doubts there two tests compiled with -O2. As you may see the result is almost identical (andl vs cmpl): Q.E.D. How about to restore original, more reader-friendly version then? 1. Reader-frie

Re: cvs commit: src/include _ctype.h

2007-10-31 Thread Christoph Mallon
Andrey Chernov wrote: On Thu, Nov 01, 2007 at 02:44:25AM +0100, Christoph Mallon wrote: Also the example is still unrealistic: You usually don't multiply chars by two. Lets try something more realistic: an ASCII filter int filter_ascii0(int c) { return c < 0 || c >= 12

Re: cvs commit: src/include _ctype.h

2007-11-01 Thread Christoph Mallon
Andrey Chernov wrote: On Tue, Oct 30, 2007 at 10:03:31AM -1000, Juli Mallett wrote: * "Andrey A. Chernov" <[EMAIL PROTECTED]> [ 2007-10-27 ] [ cvs commit: src/include _ctype.h ] ache2007-10-27 22:32:28 UTC FreeBSD src repository Modified files: include _ct

Re: cvs commit: src/include assert.h

2007-12-01 Thread Christoph Mallon
Poul-Henning Kamp wrote: phk 2007-12-01 18:56:50 UTC FreeBSD src repository Modified files: include assert.h Log: Add missing #ifndef _ASSERT_H_ protection against multiple inclusions This change violates ANSI C: "The assert macro is redefined according to t

Re: cvs commit: src/tools/regression/lib/libc/stdio test-printfloat.c test-scanfloat.c

2007-12-03 Thread Christoph Mallon
Dag-Erling Smørgrav wrote: Andrey Chernov <[EMAIL PROTECTED]> writes: David Schultz <[EMAIL PROTECTED]> writes: test-printfloat is failing on my machine due to the fact that the default locale in FreeBSD seems to have a thousands separator now. I thought the default locale wasn't supposed to. C

Re: cvs commit: src/sbin/init init.c

2008-09-28 Thread Christoph Mallon
Kostik Belousov wrote: On Sun, Sep 28, 2008 at 12:55:42PM -0700, Xin LI wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kostik Belousov wrote: On Sat, Sep 27, 2008 at 12:09:10AM +, Xin LI wrote: delphij 2008-09-27 00:09:10 UTC FreeBSD src repository Modified files: sbin

Re: cvs commit: src/sys/netinet tcp_input.c tcp_usrreq.c

2007-07-30 Thread Christoph Mallon
Dag-Erling Smørgrav wrote: Dag-Erling Smørgrav <[EMAIL PROTECTED]> writes: The attached patch unbreaks the build. With additional hunk to fix usr.bin/netstat/ipx.c, which relied on the brokenness of . Hi, may I suggest to declare the array as static const char * const tcpstates[]. M

Re: cvs commit: src/sys/amd64/amd64 busdma_machdep.c mem.c mp_watchdog.c pmap.c trap.c src/sys/amd64/conf GENERIC src/sys/amd64/isa isa_dma.c src/sys/arm/arm busdma_machdep.c mem.c pmap.c src/sys/arm/

2007-03-31 Thread Christoph Mallon
Kris Kennaway wrote: On Sun, Apr 01, 2007 at 12:10:03AM -0700, [EMAIL PROTECTED] wrote: eh? when I went to see what damage had been caused by this megachange I found no trace of it at all. Is this an April Fools mail? Hmm, I think I might have screwed something up :( CVS meisters, please help

Re: cvs commit: src/sys/amd64/amd64 busdma_machdep.c mem.c mp_watchdog.c pmap.c trap.c src/sys/amd64/conf GENERIC src/sys/amd64/isa isa_dma.c src/sys/arm/arm busdma_machdep.c mem.c pmap.c src/sys/arm/

2007-03-31 Thread Christoph Mallon
from userid 1000) id 9EFC6517E2; Sun, 1 Apr 2007 03:13:52 -0400 (EDT) This is more like Paul Saab's IP address. freefall.freebsd.org? On Sun, 1 Apr 2007, Christoph Mallon wrote: Kris Kennaway wrote: On Sun, Apr 01, 2007 at 12:10:03AM -0700, [EMAIL PROTECTED] wrote: eh? when I we

Re: cvs commit: src/sys/kern sched_ule.c

2007-03-17 Thread Christoph Mallon
Max Laier schrieb: On Saturday 17 March 2007 20:09, Jeff Roberson wrote: Any language lawyers care to comment on this? I find this strange. According to the spec "(Decrementing is equivalent to subtracting 1.)", but "pri = --pri % RQ_NQS;" will behave like you expect, while "pri = (pri - 1)

Re: cvs commit: src/sys/netinet/libalias alias_util.c

2007-12-04 Thread Christoph Mallon
Eygene Ryabinkin wrote: Tue, Dec 04, 2007 at 05:25:35PM +, Alexey Dokuchaev wrote: *ptr++ would choke since pointer arith on (void *) is undefined AFAIK. I've been under impression that ++ on void * whould simply increase it by one. This behaviour is documented for GCC: http://www.mcs.vuw

Re: cvs commit: src/sys/sys param.h

2007-12-06 Thread Christoph Mallon
Kip Macy wrote: On Dec 6, 2007 2:25 AM, Bruce Evans <[EMAIL PROTECTED]> wrote: On Thu, 6 Dec 2007, Kip Macy wrote: kmacy 2007-12-06 04:00:59 UTC FreeBSD src repository Modified files: sys/sys param.h Log: Respect the fact that the value a may be constant so cast to

Re: cvs commit: src UPDATING src/include fts.h src/lib/libc/gen Makefile.inc Symbol.map fts-compat.c fts-compat.h fts.3 fts.c src/sys/sys param.h

2008-01-28 Thread Christoph Mallon
Erik Trulsson wrote: On Mon, Jan 28, 2008 at 11:55:29AM +0100, Dag-Erling Smørgrav wrote: Yar Tikhiy <[EMAIL PROTECTED]> writes: Excuse me, but did you notice that fts(3) is not a part of sys? It's generic userland code, albeit it's contaminated by system-dependent parts for performance or wha