Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Aug 2005 22:55:39 +0300
From:      Giorgos Keramidas <keramida@linux.gr>
To:        Xin LI <delphij@frontfree.net>
Cc:        freebsd-amd64@freebsd.org, freebsd-arch@freebsd.org
Subject:   Re: [RFC] Port of NetBSD's optimized amd64 string code
Message-ID:  <20050801195539.GB1406@beatrix.daedalusnetworks.priv>
In-Reply-To: <20050801182518.GA85423@frontfree.net>
References:  <20050801182518.GA85423@frontfree.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-08-02 02:25, Xin LI <delphij@frontfree.net> wrote:
> Hi, Guys,
>
> Here is a patchset that I have produced to make our libc aware of the
> NetBSD assembly implementation of the string related operations.

I can't speak for the asm code, since I know barely enough amd64 things
to read it, but there are a few typos you might want to fix before this
gets committed.

> +	/*
> +	 * Align to word boundry
> +	 * Consider unrolling loop?

s/boundry/boundary/

> +	 * (1)  ~(((x & 0x7f....7f) + 0x7f....7f) | (x | 0x7f....7f))
> +	 *
> +	 * evaluates to a non-zero value if any of the bytes in the
> +	 * original word is zero.
> +	 *
> +	 * It also has the useful property that bytes in the result word
> +	 * that coorespond to non-zero bytes in the original word have
> +	 * the value 0x00, while bytes cooresponding to zero bytes have

s/coorespond/correspond/ in the 2 last lines.

> +	 * On little endian machines, the first byte in the result word
> +	 * that cooresponds to a zero byte in the original byte is 0x80,

Ditto.

> +	 * so clz() can be used as above.  On big endian machines, and
> +	 * little endian machines without (or with a slow) clz() insn,
> +	 * testing each byte in the original for zero is necessary

Missing final period.

> +	testq	$7,%rdx			# copy first group of 1 to 7 words
> +	jz	L2			# while swaping alternate bytes.

s/swaping/swapping/

That's all I could spot.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050801195539.GB1406>