Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2001 09:43:32 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        David Xu <davidx@viasoft.com.cn>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: add some constraints in cpufunc.h
Message-ID:  <XFMail.011126094332.jhb@FreeBSD.org>
In-Reply-To: <005201c17331$c603bcd0$ef01a8c0@davidwnt>

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

On 22-Nov-01 David Xu wrote:
> According to GCC manual of inline assembler instruction,  it says if your
> instruction
> changes condition code register(on X86,  it's cpu flag register, and a simple
> addl 
> instruction can affect it),  you'd put cc there, I have reviewed some source
> header
> files of bus management,  they all have cc constraint,  but others not,  and
> some 
> lines lost __volatile__  keyword,  GCC can feel free to optimize them and 
> re-order 
> or delete these lines when it thinks this is a right decision,  this could be
> dangerous
> when high optimizing option is turned on.

Bah, fair enough.  There are probably several places that are missing "cc".  I
doubt that there are very many bugs from this though, since "cc" is clobbered
very often during normal program flow.

-- 

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 freebsd-hackers" in the body of the message




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