bl_bit_32.h 600 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __ASM_SH_BL_BIT_32_H
  2. #define __ASM_SH_BL_BIT_32_H
  3. static inline void set_bl_bit(void)
  4. {
  5. unsigned long __dummy0, __dummy1;
  6. __asm__ __volatile__ (
  7. "stc sr, %0\n\t"
  8. "or %2, %0\n\t"
  9. "and %3, %0\n\t"
  10. "ldc %0, sr\n\t"
  11. : "=&r" (__dummy0), "=r" (__dummy1)
  12. : "r" (0x10000000), "r" (0xffffff0f)
  13. : "memory"
  14. );
  15. }
  16. static inline void clear_bl_bit(void)
  17. {
  18. unsigned long __dummy0, __dummy1;
  19. __asm__ __volatile__ (
  20. "stc sr, %0\n\t"
  21. "and %2, %0\n\t"
  22. "ldc %0, sr\n\t"
  23. : "=&r" (__dummy0), "=r" (__dummy1)
  24. : "1" (~0x10000000)
  25. : "memory"
  26. );
  27. }
  28. #endif /* __ASM_SH_BL_BIT_32_H */