asm.h 405 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #ifndef __ASM__
  3. #define __ASM__
  4. #define ENTRY(name)\
  5. .global name; \
  6. name:
  7. #endif
  8. // 符号名
  9. #define SYMBOL_NAME(X) X
  10. // 符号名字符串
  11. #define SYMBOL_NAME_STR(X) #X
  12. // 符号名label
  13. #define SYMBOL_NAME_LABEL(X) X##:
  14. #define L1_CACHE_BYTES 32
  15. #define asmlinkage __attribute__((regparm(0)))
  16. #define ____cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES)))