Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 May 2002 10:24:52 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Jonathan Mini <mini@freebsd.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Peter Jeremy <peter.jeremy@alcatel.com.au>
Subject:   Re: cvs commit: src/sys/kern kern_mutex.c
Message-ID:  <XFMail.20020523102452.jhb@FreeBSD.org>
In-Reply-To: <20020523070814.Q25907@stylus.haikugeek.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 23-May-2002 Jonathan Mini wrote:
> John Baldwin [jhb@FreeBSD.org] wrote :
> 
>> In Intel's documentation they said that all current look-alikes worked as
>> well.  It's the opcode for 'rep mov'.  I am curious if some implementations
>> trash %ecx, and if we are paranoid we could always clobber %ecx in the
>> constraints.  [ ... ]
> 
> The rep prefix doesn't modify any registers.  You do need to make
> sure that %ecx was zero when you dispatch a rep mov (unles you're
> dispatching a rep mov $0, %ecx), or you'll get an infinite loop.

Bah, it's rep nop, not rep mov.  rep does modify %ecx when used with, say
string instructions.  It decrements %[e]cx once for each interation.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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