Subversion Repositories Kolibri OS

Rev

Rev 854 | Rev 862 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 854 Rev 859
Line 44... Line 44...
44
		"popf\n"
44
		"popf\n"
45
    : : "r" (efl)
45
    : : "r" (efl)
46
	);
46
	);
47
}
47
}
48
48
 
-
 
49
static inline count_t fnzb(u32_t arg)
-
 
50
{
-
 
51
  count_t n;
-
 
52
  asm volatile ("xor %0, %0 \n\t"
-
 
53
                "bsr %0, %1"
-
 
54
                :"=&r" (n)
-
 
55
                :"r"(arg)
-
 
56
                );
-
 
57
	return n;
-
 
58
}
-
 
59
 
-
 
60
static inline count_t _bsf(u32_t arg)
-
 
61
{
-
 
62
  count_t n;
-
 
63
  asm volatile ("xor %0, %0 \n\t"
-
 
64
                "bsf %0, %1"
-
 
65
                :"=&r" (n)
-
 
66
                :"r"(arg)
-
 
67
                );
-
 
68
	return n;
-
 
69
}
-
 
70
 
-
 
71
static inline void _bts(u32_t *data, count_t val)
-
 
72
{
-
 
73
  asm volatile ("bts %0, %1 \n\t"
-
 
74
                :
-
 
75
                :"g"(data), "r"(val)
-
 
76
                :"cc"
-
 
77
                );
-
 
78
}
-
 
79
 
-
 
80
static inline void _btr(u32_t *data, count_t val)
-
 
81
{
-
 
82
  asm volatile ("btr %0, %1 \n\t"
-
 
83
                :
-
 
84
                :"g"(data), "r"(val)
-
 
85
                :"cc"
-
 
86
                );
-
 
87
}
-
 
88