diff options
author | H. Peter Anvin <hpa@zytor.com> | 2011-04-04 09:58:44 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2011-04-04 10:00:25 -0700 |
commit | af97187d32aa51d5109af813187b98081e7d7b2f (patch) | |
tree | d6d8a919c1eae67c4800d1e50b6d4238f00bcb10 /com32/include | |
parent | 780bab7c179247f1c42610c1f70d99f996e787ec (diff) | |
download | syslinux-af97187d32aa51d5109af813187b98081e7d7b2f.tar.gz |
bitops: the bt instructions returns result in CF, not ZF
The bit test instructions returns the tested bit in CF, not the
inverse of the tested bit in ZF. I don't know how I got that idea...
Reported-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/include')
-rw-r--r-- | com32/include/sys/bitops.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/com32/include/sys/bitops.h b/com32/include/sys/bitops.h index 06cf9f3e..bfc09d79 100644 --- a/com32/include/sys/bitops.h +++ b/com32/include/sys/bitops.h @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 2010 Intel Corporation; author: H. Peter Anvin + * Copyright 2010-2011 Intel Corporation; author: H. Peter Anvin * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -49,7 +49,7 @@ static inline void clr_bit(long __bit, void *__bitmap) static inline int __purefunc test_bit(long __bit, const void *__bitmap) { unsigned char __r; - asm("btl %2,%1; setnz %0" + asm("btl %2,%1; setc %0" : "=r" (__r) : "m" (__bitmap), "Ir" (__bit)); return __r; |