aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/bitops.c
Commit message (Collapse)AuthorAgeFilesLines
* x86: Fix handling of BSF and BSR instructions.Keir Fraser2008-04-221-15/+17
| | | | | | | | | | 1. We cannot rely on BSF/BSR leaving the destination register intact if the source is zero (according to Intel manuals) 2. We race clear_bit() in find_first_bit(), which may occur after SCAS but before BSF. So we must handle zero input to BSF. Signed-off-by: Naoki Nishiguchi <nisiguti@jp.fujitsu.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Clean up asm keyword usage (asm volatile rather than __asm__kfraser@localhost.localdomain2007-09-111-5/+5
| | | | | | | | | | | | | | | | __volatile__ in most places) and ensure we use volatile keyword wherever we have an asm stmt that produces outputs but has other unspecified side effects or dependencies other than the explicitly-stated inputs. Also added volatile in a few places where its not strictly necessary but where it's unlikely to produce worse code and it makes our intentions perfectly clear. The original problem this patch fixes was tracked down by Joseph Cihula <joseph.cihula@intel.com>. Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix assertions in bitops.c.kaf24@firebug.cl.cam.ac.uk2005-10-221-2/+2
| | | | | | | Signed-off-by: Aravindh Puthiyaparambil <aravindh.puthiyaparambil@unisys.com>
* bitkeeper revision 1.1591 (4299ea37xQ46OSnnhSi-IyVI2uATLw)kaf24@firebug.cl.cam.ac.uk2005-05-291-21/+21
| | | | | | | | Bit-scanning function take offset/size as an int, not a long, and return an int. This allows some small optimisation in code produced for x86/64. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1589 (4299ca474xuIi4-NBh-bI0ilQ8Sw7w)kaf24@firebug.cl.cam.ac.uk2005-05-291-0/+99
More bitop cleanups and code improvements. Signed-off-by: Keir Fraser <keir@xensource.com>