asm.h 784 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef _ASM_X86_ASM_H
  2. #define _ASM_X86_ASM_H
  3. #ifdef CONFIG_X86_32
  4. /* 32 bits */
  5. # define _ASM_PTR " .long "
  6. # define _ASM_ALIGN " .balign 4 "
  7. # define _ASM_MOV_UL " movl "
  8. # define _ASM_INC " incl "
  9. # define _ASM_DEC " decl "
  10. # define _ASM_ADD " addl "
  11. # define _ASM_SUB " subl "
  12. # define _ASM_XADD " xaddl "
  13. #else
  14. /* 64 bits */
  15. # define _ASM_PTR " .quad "
  16. # define _ASM_ALIGN " .balign 8 "
  17. # define _ASM_MOV_UL " movq "
  18. # define _ASM_INC " incq "
  19. # define _ASM_DEC " decq "
  20. # define _ASM_ADD " addq "
  21. # define _ASM_SUB " subq "
  22. # define _ASM_XADD " xaddq "
  23. #endif /* CONFIG_X86_32 */
  24. /* Exception table entry */
  25. # define _ASM_EXTABLE(from,to) \
  26. " .section __ex_table,\"a\"\n" \
  27. _ASM_ALIGN "\n" \
  28. _ASM_PTR #from "," #to "\n" \
  29. " .previous\n"
  30. #endif /* _ASM_X86_ASM_H */