Subversion Repositories Kolibri OS

Rev

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

Rev 864 Rev 886
Line 14... Line 14...
14
 
14
 
Line 15... Line 15...
15
static inline u32_t save_edx(void)
15
static inline u32_t save_edx(void)
16
{
16
{
17
  u32_t val;
17
  u32_t val;
18
  asm volatile ("mov %0, edx":"=r"(val));
18
  asm volatile ("movl %%edx, %0":"=r"(val));
19
  return val;
19
  return val;
20
};
20
};
Line 21... Line 21...
21
 
21
 
22
static inline void restore_edx(u32_t val)
22
static inline void restore_edx(u32_t val)
Line 522... Line 522...
522
static inline int to_order(count_t arg)
522
static inline int to_order(count_t arg)
523
{
523
{
524
  int n;
524
  int n;
525
  asm volatile (
525
  asm volatile (
526
                "xor eax, eax \n\t"
526
                "xorl %eax, %eax \n\t"
527
                "bsr eax, edx \n\t"
527
                "bsr %edx, %eax \n\t"
528
                "inc eax"
528
                "incl %eax"
529
                :"=a" (n)
529
                :"=a" (n)
530
                :"d"(arg)
530
                :"d"(arg)
531
                );
531
                );
532
	return n;
532
	return n;
533
}
533
}