Subject: Re: ktr from freebsd
To: Bill Studenmund <wrstuden@netbsd.org>
From: enami tsugutomo <enami@but-b.or.jp>
List: tech-kern
Date: 04/30/2004 08:03:10
> > Though it is easily fixable, that is not true with current
> > implementation.
> 
> Huh? I was saying that we have two lengths we store in the uvmhist=20
> entries, and that one of them is strlen()'s will be turned into a constant=
> =20
> at compile time by our compiler. How is that not true?

The strlen call isn't folded to constant actually.

enami.

	.section	.rodata.str1.1
.LC2:
	.string	"called!"
	:
	movl	maphist+28, %edx
	movl	-220(%ebp), %ecx
	xorl	%ebx, %ebx
	movl	$0, 8(%edx,%ecx)
	movl	$.LC2, 12(%edx,%ecx)
	movl	$.LC2, %edi
	cld
	movb	%bl, %al
	movl	$-1, %ecx
	repnz
	scasb
	notl	%ecx
	movl	-220(%ebp), %eax
	decl	%ecx
	movl	_uvmhist_name.1, %edi
	movl	%ecx, 16(%edx,%eax)
	movl	%edi, 20(%edx,%eax)
	movl	$-1, %ecx
	movb	%bl, %al
	repnz
	scasb
	notl	%ecx
	movl	-220(%ebp), %eax